In
this Weblog submit we are going to discover the Clear Dice & Merge Information Slices possibility in
Planning and could be leveraged to EPCM purposes utilizing the REST API &
Groovy
The
Clear Dice could be accessed from the Simplified Interface.
It
does enable to Create a “Clear Dice” job on this display the place you possibly can choose the
Dice you wish to clear the info.
It
does have the choices on what must be cleared?
& The
Clear Choices
Lets see the choice on how one can invoke the Clear Dice utilizing the REST API.
The
Clear Dice job deletes the info you specify inside enter and reporting cubes,
nevertheless it doesn’t delete the applying definition within the utility’s
relational tables.
With Partial Information Clear it offers the choice to selected the POV to clear the info in Fundamental Mode
By Choosing the Superior Mode it is possible for you to to specify the MDX question for the clear.
Clear
Essbase knowledge solely by utilizing an MDX expression within the textual content field offered.
*
Essbase Information Logical: Through which the enter cells within the specified area are
written to a brand new knowledge slice with destructive, compensating values that lead to a
worth of zero for the cells you wish to clear. The method for logically
clearing knowledge completes in a size of time that’s proportional to the dimensions of
the info being cleared. As a result of compensating cells are created, this feature
will increase the dimensions of the database.
* Essbase Information Bodily: Through which the enter
cells within the specified area are bodily faraway from the combination storage
database. The method for bodily clearing knowledge completes in a size of
time that’s proportional to the dimensions of the enter knowledge, not the dimensions of the
knowledge being cleared. Subsequently, you would possibly sometimes use this technique solely when
you’ll want to take away giant slices of information.
Pattern
Payload
{“jobType”:”CLEAR_CUBE”,
“jobName”:”ClearPlan1″}
Lets discover how one can invoke the “Clear Dice” utilizing the REST API & Groovy,
jsonResponse
=
operation.utility.getConnection(“Localhost”).submit(‘/relaxation/v3/purposes/PCM/jobs’)
.header(“Content material-Kind”,
“utility/json”)
.physique(json([
“jobType” : “Clear
Cube”,
“jobName” :
“CLR_PCM_01”
])
)
.asString();
println ‘Response Obtained’
println jsonResponse.physique
Making a POST Request:
- The code
begins by making a POST request to a particular endpoint utilizing the submit()
technique. - The
endpoint is ‘/relaxation/v3/purposes/PCM/jobs’.
Setting Headers:
- The .header(“Content material-Kind”,
“utility/json”) line units the request header to point
that the content material being despatched is in JSON format.
Setting Request Physique:
- The .physique(json([…]))
half specifies the request physique. - Inside
the json([…]), we now have an array with two key-value pairs:
- “jobType”
: “Clear Dice”: This means the kind of job being requested
(on this case, “Clear Dice”). - “jobName”
: “CLR_PCM_01”: This specifies the title of the job
(“CLR_PCM_01”).
Executing the Request:
- The .asString()
technique sends the request and receives the response. - The
response is saved within the jsonResponse variable.
Printing the Response:
- The println
‘Response Obtained’ line prints a message indicating that the response
has been obtained. - The println
jsonResponse.physique line prints the precise response physique.
In abstract,
this code snippet sends a POST request to the desired endpoint with a JSON
payload containing job info. It then prints the response obtained from
the server.
Merges
incremental knowledge slices of an ASO dice. Fewer slices enhance a dice’s
efficiency. You possibly can merge all incremental knowledge slices into the primary database
slice or merge all incremental knowledge slices right into a single knowledge slice with out
altering the primary database slice. You possibly can optionally take away cells which have a
worth of zero.
Might be accessed from Jobs Console underneath Schedule it’s best to be capable to find the Merge Information Slices.
It may be Scheduled or run instantly.
Which provides the next choices, of choosing the Dice to run the Merge together with different choices.
The next Desk
summarizes the consumer request parameters particular to this job,
Groovy Code:
jsonResponse
=
operation.utility.getConnection(“Localhost”).submit(‘/relaxation/v3/purposes/PCM/jobs’)
.header(“Content material-Kind”,
“utility/json”)
.physique(json([
“jobType” : “Merge Data
Slices”,
“jobName” : “Merge Data
Slices PCMRPT”,
“parameters”: [
“cubeName”: “PCMRPT”,
“mergeSliceType”:
“allIncrementalSlicesInMain”,
“keepZeroCells”:
“false”
]
])
)
.asString();
println ‘Response Obtained’
println jsonResponse.physique
Set up
Connection:
jsonResponse
=
operation.utility.getConnection(“Localhost”).submit(‘/relaxation/v3/purposes/PCM/jobs’)
Set
Request Physique:
This
specifies the physique of the request, formatted as JSON. The JSON object consists of:
- “jobType”: Kind of
the job to be carried out, right here it is “Merge Information Slices”. - “jobName”: Identify of
the job, right here it is “Merge Information Slices PCMRPT”. - “parameters”: An
array of parameters for the job: - “cubeName”: Identify
of the dice to be processed, right here it is “PCMRPT”. - “mergeSliceType”: Kind
of merge operation, right here it is “allIncrementalSlicesInMain”. - “keepZeroCells”: A flag
indicating whether or not to maintain zero cells, right here set to “false”.
Hope this Helps, Comfortable Days on the Cloud!