Clear Cube

Enables you to clear specific data within input and reporting cubes. You can clear the data using member selection or a valid MDX query. Using member selection, you can also optionally clear related supporting details, comments, and attachments. You can also elect to do a physical or logical clear of data. This gives you more flexibility and granularity when clearing the cube.

NOTE: The Clear Cube job deletes the data you specify within input and reporting cubes, but it does not delete the application definition in the application's relational tables.

Using this REST API requires prerequisites, such as understanding how to use jobs. See Prerequisites. Be sure that you understand how to use jobs as described in Managing Jobs.

Request

Supported Media Types: application/json

Parameters

The following table summarizes the client request parameters specific to this job. For additional parameters that are common to all jobs, see Execute a Job.

Table 5-18 Clear Cube

Name Description Required Default
jobType Clear Cube or CLEAR_CUBE (both parameters are supported) Yes None
jobName Name of the job to run.

Important: You must use the exact name of a job that is already defined in the application.

Example: ClearPlan1

Yes None
cube Valid ASO cube name No As per the job definition
members Valid member selection that is comma separated. Applicable only for Partial Clear Job, for an ASO cube, defined with member selection.

Example: "ILvl0Descendants(Exchange Rates),Total Expense"

No As per the job definition
mdxQuery Valid MDX query. Applicable only for Partial Clear Job, for an ASO cube, defined with MDX query support.

Example: "Crossjoin({[Apr],[May],[Jun]},{[Expense1]})"

No As per the job definition
clearSupportingDetails Specify if supporting details should be cleared. Allowed values: true or false. Applicable only for Partial Clear Job, for an ASO cube, defined with member selection. No As per the job definition
clearComments Specify if comments should be cleared. Allowed values: true or false. Applicable only for Partial Clear Job, for an ASO cube, defined with member selection. No As per the job definition
clearAttachments Specify if attachments should be cleared. Allowed values: true or false. Applicable only for Partial Clear Job, for an ASO cube, defined with member selection. No As per the job definition
clearPhysicalOnEssbase Specify if this is a physical clear on Essbase. Allowed values: true or false. Applicable only for Partial Clear Job, for an ASO cube, defined with member selection or MDX query support. No As per the job definition

For a sample URL, see Sample URL and Payload in Execute a Job.

Sample Payload

{"jobType":"CLEAR_CUBE", "jobName":"ClearPlan1"}

Example: Executes the clear job Clear_Partial_Basic, which is defined with member selection, and overrides the cube and members parameters.

{
    "jobType": "Clear Cube",
    "jobName": "Clear_Partial_Basic",
    "parameters": {
        "cube": "HP1_ASO",
        "members": "ILvl0Descendants(Exchange Rates),Siblings(Total Expense)"
    }
}

Example: Executes the clear job Clear_Partial_Basic, which is defined with member selection, and overrides the cube, clearSupportingDetails, clearComments, and other parameters.

{
    "jobType": "Clear Cube",
    "jobName": "Clear_Partial_Basic",
    "parameters": {
        "cube":"HP1_ASO",
        "members":"ILvl0Descendants(Exchange Rates),Siblings(Total Expense)",
        "clearSupportingDetails":"false",
        "clearComments":false,
        "clearAttachments":false,
        "clearPhysicalOnEssbase":false
    }
}

Example: Executes the clear job Clear_Partial_Advanced, which is defined with the MDX query, and overrides the mdxQuery parameter.

{
    "jobType": "Clear Cube",
    "jobName": "Clear_Partial_Advanced",
    "parameters": {
    	    "mdxQuery":"Crossjoin({[Apr],[May],[Jun]},{[Expense1]})"
    }
}

Example: Executes the clear job Clear_Partial_Advanced, which is defined with the MDX query, and overrides the cube, mdxQuery, and clearPhysicalOnEssbase parameters.

{
    "jobType": "Clear Cube",
    "jobName": "Clear_Partial_Advanced",
    "parameters": {
        "cube":"HP1_ASO",
        "mdxQuery":"Crossjoin({[Apr],[May],[Jun]},{[Expense1]})",
         "clearPhysicalOnEssbase":false
    }
}