public class CopyDataRequest
extends java.lang.Object
Example call from Groovy to copy data, supporting details, cell comments and cell attachments from Current -> FY16 to Budget -> FY17:
Application app = operation.application
Cube cube = app.getCube("Plan2")
CopyDataRequest request = cube.createCopyDataRequest().setCopySupportingDetail(true).setCopyComments(true).setCopyAttachments(true)
request = request.addSourceAndTarget("Current", "Budget").addSourceAndTarget("FY16", "FY17")
.addFixedMembers(app.getDimension("Employee"), "ILvl0Descendants(Employee)")
.addFixedMembers(app.getDimension("Account"), "Grade", "Salary", "Bonus", "Employee Phone", "Employee Email", "Reporting Manager")
.addFixedMembers(app.getDimension("Currency"), "USD")
.addFixedMembers(app.getDimension("Version"), "BU Version_1")
.addFixedMembers(app.getDimension("Entity"), "No Entity")
.addFixedMembers(app.getDimension("Period"), "BegBalance")
request.copyData()
A single DataCopyRequest can only be used one time. However, it is still straightforward to perfrom multiple similar data copies. For example the following script can be used to copy last year's Actual data from the Final version to all level 0 versions in this year's Budget:
Application app = operation.application
Cube cube = app.getCube("Plan2")
List<Member> versions = app.getDimension("Version").getEvaluatedMembers("ILvl0Descendants(Version)", cube)
versions.remove(app.getDimension("Version").getMember("Final"))
versions.each { version ->
CopyDataRequest request = cube.createCopyDataRequest().setCopySupportingDetail(true).setCopyComments(true).setCopyAttachments(true)
request = request.addSourceAndTarget("Actual", "Budget").addSourceAndTarget("&LastYear", "&ThisYear").addSourceAndTarget("Final", version)
request.addFixedMembers(app.getDimension("Employee"), "ILvl0Descendants(Employee)")
request.addFixedMembers(app.getDimension("Account"), "Grade", "Salary", "Bonus", "Employee Phone", "Employee Email", "Reporting Manager")
request.addFixedMembers(app.getDimension("Currency"), "USD")
request.addFixedMembers(app.getDimension("Entity"), "No Entity")
request.addFixedMembers(app.getDimension("Period"), "BegBalance")
request.copyData()
}
Example call from Groovy to copy data usimg member references (Rtp for Employee and Member for Account member Salary):
/*RTPS: {MyEmployees}*/
Application app = operation.application
Cube cube = app.getCube("Plan2")
Member salaryMember = app.getDimension("Account").getMember("Salary")
CopyDataRequest request = cube.createCopyDataRequest().setCopySupportingDetail(false).setCopyComments(false).setCopyAttachments(false)
request = request.addSourceAndTarget("Current", "ILvl0Descendants(Budget)").addSourceAndTarget("FY16", "FY17")
.addFixedMembers(app.getDimension("Employee"), rtps.MyEmployees)
.addFixedMembers(app.getDimension("Account"), "Grade", salaryMember, "Bonus", "Employee Phone", "Employee Email", "Reporting Manager")
.addFixedMembers(app.getDimension("Currency"), "USD")
.addFixedMembers(app.getDimension("Version"), "BU Version_1")
.addFixedMembers(app.getDimension("Entity"), "No Entity")
.addFixedMembers(app.getDimension("Period"), "BegBalance")
request.copyData()
| Modifier and Type | Method and Description |
|---|---|
CopyDataRequest |
addFixedMembers(Dimension dimension,
java.lang.Object... memberRefs)
Returns this object after setting the members for the data intersections to copy data from for the specified dimension.
|
CopyDataRequest |
addSourceAndTarget(java.lang.Object sourceMemberRef,
java.lang.Object targetMemberRef)
Returns this object after setting the dimension members for the data intersections to copy data into.
|
void |
copyData()
Copy data and relational data from source to target data intersections as defined in this request.
|
CopyDataRequest |
setCopyAttachments(boolean copyAttachments)
Specifies if the cell attachments should be copied to the target region.
|
CopyDataRequest |
setCopyComments(boolean copyComments)
Specifies if the cell comments should be copied to the target region.
|
CopyDataRequest |
setCopyData(boolean copyData)
Specifies if the Essbase data should be copied to the target region.
|
CopyDataRequest |
setCopySupportingDetail(boolean copySupportingDetail)
Specifies if the supporting details should be copied to the target region.
|
public CopyDataRequest addFixedMembers(Dimension dimension, java.lang.Object... memberRefs)
You can select multiple members. You must select at least one member for Scenario, Account, Entity, Period, and Version dimensions.
dimension - dimension to copy frommemberRefs - an array of objects representing references to members to copy from
(see section Member References)public CopyDataRequest addSourceAndTarget(java.lang.Object sourceMemberRef, java.lang.Object targetMemberRef)
You can select only one member for source and target belonging to the same dimension.
sourceMemberRef - an object representing a reference to a source member
(see section Member References)targetMemberRef - an object representing a reference to a target member
(see section Member References)IllegalScriptArgumentException - if either source or target is null,com.hyperion.planning.HspRuntimeException - if source or target member references evaluate to more than one member,
if source and target members belong to different dimensions, or if they are dynamic calc or dynamix calc and storecom.hyperion.planning.InvalidMemberException - if either source or target member is not valid for the cube data is being copied forpublic void copyData()
throws java.lang.Exception
Relational data from the target region will be first deleted and then the relational data from the source region will be copied over.
This is a privileged method, see section Privileged Method
java.lang.Exceptionpublic CopyDataRequest setCopyAttachments(boolean copyAttachments)
copyAttachments - true to copy cell attachments to the target, defaults to falsepublic CopyDataRequest setCopyComments(boolean copyComments)
copyComments - true to copy cell comments details to the target, defaults to falsepublic CopyDataRequest setCopyData(boolean copyData)
copyData - true to copy Essbase data to the target, defaults to truepublic CopyDataRequest setCopySupportingDetail(boolean copySupportingDetail)
copySupportingDetail - true to copy supporting details to the target, defaults to falseCopyright © 2017, 2025, Oracle and/or its affiliates. All rights reserved.