icCube

Documentation

ExecuteMdxScript

Execute a MDX script.

URL

/icCube/api/console/mdx/ExecuteMdxScript

Parameters

Name Type Cardinality Default value
schemaName  string  one   
script  string  one   

Return (Payload)

JavaNativeError {

    lineNumber    : number;

    startPosition : number;
    endPosition   : number;

    message       : String;

}

JavaNativeErrors {

    sourceCode : string;
    errors     : JavaNativeError[];
}

MdxRangeRegion {

    from       : number;  -- 0-based
    to         : number;  -- 0-based: inclusive
    lineNumber : number;  -- 1-based

}

MdxRange {

    regions : MdxRangeRegion[];

}

MdxError {

    errorCode         : string;
    errorMessage      : string;

    range?            : MdxRange;
    javaNativeErrors? : JavaNativeErrors;

}

MdxDataSetAxisMeta {

    name: string;

    /**
     * A axis is made of tuples of tlen members.
     */
    tlen: number;

    /**
     * The captions of the hierarchies of the members.
     */
    h_caption: string[];

    /**
     * The types of the hierarchies of the members (string, date, null, etc...).
     */
    h_type: string[];

    /**
     * The unique names of the hierarchies of the members.
     */
    h_un: string[];

}

MdxDataSetMeta {

    kind   : string;  -- select|drillthrough

    axes   : MdxDataSetAxisMeta[];
    slicer : MdxDataSetAxisMeta;

}

MdxDataSetAxis {

    name : string;

    /**
     * Number of tuples in this axis.
     */
    len : number;

    /**
     * Number of members per tuple (e.g., an axis made of a crossjoin has more than one member).
     */
    tlen : number;

    /**
     * Captions of the members (each tuple being expanded in the array).
     */
    caption : string[];

    /**
     * Unique names of the members (each tuple being expanded in the array).
     *
     * Drillthrough: none.
     */
    un? : string[];

    /**
     * Keys of the members (each tuple being expanded in the array).
     *
     * Drillthrough: none.
     */
    key? : string[];

}

MdxDataSetCells {

    -- Each field corresponds to a cell property (e.g., VALUE) as a one-dimensional array.
    -- Within this array, cells are ordered according to their ordinal (0-based).

}

MdxDataSetQuery {

    -- Several properties about the query (e.g., schemaName, filter info, drillthrough info, ...)

}

MdxDataSetTable {

    ic3    : string; -- 1

    meta   : MdxDataSetMeta;

    axes   : MdxDataSetAxis[];
    slicer : MdxDataSetAxis;    -- null for drillthrough

    cells  : MdxDataSetCells;

    query  : MdxDataSetQuery;
}

MdxDataSet {

    version : string;  -- 0.6
    status  : string;  -- ok

    table   : MdxDataSetTable;

}

MdxResult {

    error?   : MdxError;
    dataSet? : MdxDataSet;

}

ScriptResult {

    error?   : MdxError;
    results? : MdxResult[];

}

Description


This request execute a MDX script against a loaded schema.

Note that the execution of the script is ignoring the MDX result cache.

The script can contain one or more statements. A statement can be one of the following:

- a MDX select statement
- a MDX drillthrough statement
- a create/drop/command statement

So on top of regular MDX statements (i.e., select from ...) a script can contain any statement (e.g., create/drop member ...) and ic3 commands (www).

On completion, the response contains either an error (e.g., more likely because the script could not be compiled/executed) or a list of results (one result for each statement of the script). Each result might be in turn either an error (e.g., a MDX select could not performed because of an unknown member) or a dataset.

Note that create/drop/command results are for the time being blank (i.e., an empty JSON object).

Please refer to Return (Payload) section above for a detailed description of the response. This description use a Typescript like notation.