Jedox OLAP documentation

home > API > [/view/calculate] >
request url https://[SERVER]:[PORT]/view/calculate[?PARAMETER1=value[&...]]
short description Calculates view
long description Full view calculation in one step, axes with zero supression and custom rules and values

Basics
Function /view/calculate has 2 modes of usage. When cube is specified, there has to be one subset for each dimension in the cube defined and function returns axes and cell data for the view. When cube is not specified, only defined axes are returned. This mode can be used for subset calculation. Definition of the view has 3 basic parts: subsets, axes and area

Subsets
Subset is described as collection of filters. Same filters are used as in current PALO.SUBSET. Only difference is that some filters can be specified more than once and then union is made between the results. It is Picklist, Hierarchy and Data filter.

Axes
Each axis is defined by list of subsets supplemented with information about custom rules, usage of zero suppression and subsets hierarchy. Each subset can have parent subset on axis, if it is defined zero suppression for this subset is calculated for each element of the parent subset and not only once for whole area.

Area
Area just contains list of cell properties, that will be returned for each cell.

parameters
name type description
database identifier Identifier of the database
name_database string Name of the database. Used only if database parameter is omitted.
cube identifier Identifier of the cube
name_cube string Name of the cube. Used only if cube parameter is omitted.
view_subsets string $ separated list of subset definitions
view_axes string $ separated list of axis definitions. There always has to be 3 axes header$columns$rows. Axis definition can be empty. Can optionally contain axis sorting definition header$columns$rows$sort.
view_area string Semicolon separated list of area options. First is colon separated list of cell properties, followed by optional pairs start:limit for each axis and list of additional properties for each axis.
view_expanders string $ separated list of expander definitions
view_tuples string List definition
mode identifier optional flags 0x01 - ommit header, 0x02 - ommit rows, 0x04 - ommit columns, 0x08 ommit area, 0x10 return subset names, 0x20 compress result, 0x40 - return only axes sizes, 0x80 - send parent paths, 0x100 - return also [Size] section, 0x200 drill picklists, 0x400 return cube info, 0x800 return defaults in cube info, 0x1000 mark sort column, 0x2000 handle alias format, 0x4000 compress parent paths, 0x8000 adjust parent-child relations in subset over subset, 0x10000 - sent parent path for shifted relations, 0x20000 - sent more detailed information about missing variables
squash_list boolean If 1 then children and parents list are shortened to intervals (1-10) and weights are shortened to weight:count
sid string Session identifier for a server connection. Use the /server/login request to get a valid session identifier.
result
# name type description
0 complex string See further information
examples
description
Whole view calculation
Subset calculation
further information More detailed description of parameters and result

Subset definition
<subset name>;<dimension name>;<; separated list of filter definitions>

Filter definition
Alias Filter
Flags
0x01 search one attribute for an alias
0x02 search two attributes for an alias
0x10 use advanced filter expressions for attribute-values
0x20 do not use POSIX-Basic expressions but use Perl-Extended regular expressions
0x40 case insensitive regex
0x80 inherit from parent subset

2;<flags>;<attribute1 name>;<attribute2 name>;<column length>:<, separated list of use_translation bools>;<: separated list of attribute filters>
Example 2;18;"Deutsch";"English";3;"English":"Feb*":"Jan*":"Deutsch":"*uar":"*"

Picklist filter
Flags
0x01 put manually picked elements after the others
0x02 merge manually picked elements with the others
0x04 use the picklist as a filter, not as a union
0x08 default value, put manually picked elements before the others
0x10 similar to 0x04, but expected to be only filter in subset
0x20 ignore nonexistent elements
0x40 put manually picked elements before the others and ignore or other filters
0x80 similar to 0x04, but hierarchy and expansion filters are ignored when picklist is empty

0;<flags>;<: separated list of element names>

Data filter
Flags
0x0001 use min operator on cell values
0x0002 use max operator on cell values
0x0004 use sum operator on cell values
0x0008 use average operator on cell values
0x0010 conditions must be true for at least one value
0x0020 conditions must be true for all values
0x0040 interpret data as strings
0x0080 computedata only for consolidations (don't filter leaves)
0x0100 compute data only for leaves (don't filter consolidations)
0x0200 sort elements from highest to lowest and choose those that contribute the first p1% (set percentage method)
0x0400 sort elements from lowest to highest and choose those that contribute the first p1% (set percentage method)
0x0800 sort elements from highest to lowest and choose those that contribute p2% after removing the first elements that make up p1%
0x1000 pick only the top-x elements. x set by set_top
0x2000 do not use rules when extracting cell values
0x4000 use AND to previous dfilter instead of OR

4;<flags>;<cube name>;<0|1 use strings>;<compare1 operator>;<compare1 value>;<compare2 operator>;<compare2 value>;<coordinates count>;<; separated list of : separated lists of element names>;<upper percentage>;<lower percentage>;<top>
Example 4;4;"Sales";0;">";10;;0;6;;"Germany:France";"Jan";"2007";"Actual";"Units";;;0

Sorting filter
Flags
0x0000001 sort filtered elements according to name (default, not necessary to pass)
0x0000002 sort filtered elements according to value computed by data-filter !! MIGHT BE STRING DATA !!
0x0000004 sort according to an attribute (to be set separately)
0x0000008 sort according to aliases as determined by alias filter
0x0000010 show parents below their children
0x0000020 do not sort consolidated elements
0x0000040 show duplicates that have different parents
0x0000080 show whole hierarchy
0x0000100 position --default
0x0000200 reverse the sorting
0x0000400 sort on the level of level-element
0x0000800 do NOT build a tree -- default
0x0001000 build a tree, but do not follow the children-list of an element that has been filtered out before
0x0002000 only sort consolidations
0x0004000 sort all levels except one
0x0008000 show duplicates, default value is 0 (flag inactive - duplicates are hidden)
0x0010000 this will completely reverse the ordering
0x0020000 limit number of elements returned
0x0040000 sort by consolidation order
0x0080000 return also id path
0x0100000 completely skip sorting (when this option is used subset can't be used as source for other subset)
0x0200000 don't return path (default for subset mode)
0x0400000 return also name path (default for view mode)
0x0800000 Inherit sorting filter from parent subset and apply limit if specified
0x2000000 Use new sorting algorithm

0x8000000 Use consistent indent

5;<flags>;<indent>;<attribute name>;<level>;<limit_count>;<limit start>

Hierarchical filter
Flags
0x0001 choose elements below including element passed to set_bound
0x0002 choose elements below excluding element passed to set_bound
0x0004 remove all consolidated elements from set, show only leaves
0x0008 remove all non-consolidated elements, show aggregations only
0x0040 revolve (repeat) the list, choose all elements on the same level
0x0080 add all elements with the same or a higher level than elemname and repeat the list
0x0100 add all elements with the same or a lower level than elemname and repeat the list
0x0200 choose elements above excluding element passed to set_bound
0x0400 choose elements above including element passed to set_bound
0x0800 simply repeat the list without further filtering
0x1000 use levels relative to bound element, if there is no bound element, return elements without parents
0x2000 choose siblings excluding element passed to set_bound
0x4000 choose siblings including element passed to set_bound

1;<flags>;<indent>;<bound element name>;<level start>;<level end>;<revolve count>;<revolve name>

Text filter
Flags
0x02 do not use POSIX-Basic expressions but use Perl-Extended regular expressions
0x04 use element name not alias
0x08 case insensitive regex

3;<flags>;<: separated list of regular expressions>

Stored filter
6;<name>;<0|1 global>;<variables count (-1 if only necessary variables should be find out wihtout evaluating subset>;<variable1=value1>;...;<variableN=valueN>
value in variables can be either
single value, f.e. 1
array, f.e. 1,2,3,4
matrix, f.e. 1,2,3:4,5,6:7,8,9 (‘:’ is column separator, so in this case 1,2,3 is first column, 4,5,6 second, etc.)

If there are defined variables in stored subset that are not in the variable list, request finishes with error and server returns list of missing variables in the following format:
First line is error code and description as usual, in this case
1035;Variable not listed in request;;
followed by list of variables
<subset name 1>;<name 1>;<0|1 global>;<comma separated list of variables>;
<subset name 1>;<name 2>;<0|1 global>;<comma separated list of variables>;
<subset name 2>;<name 1>;<0|1 global>;<comma separated list of variables>;
...

list of variable is either just names or whith mode 0x2000 it is <name>:<0|1 1 - string should quoted>:<0|1|2 - 0 single, 1 - array, 2 - matrix>:<0|1|2 0 - numeric, 1 - string, 2 - any>

Default filter
7

Alias Format
8;<alias format>

Expansion Filter
Flags

9;<flags>;<: separated list of element names>;<level>

Axis definition
; separated list of quadruplets describing subsets <subset name|exception list>;<parent subset name>;<custom rules>;<0|1|2 zero suppression>
Exception list is colon separated list of exceptions. First exception is subset name, other exceptions are comma separated lists of combination identificators (subset name or element name/path) for each subset preceding this subset on axis and subset name which should be applied for such combination.

Axis sorting definition
<axis id>;<sort mode - 0 none, 1 flat, 2 nested>;<0 descending, 1 ascending>;<; separated list of column definition>

Expander definition
<name>;<top subset>;<variable>;<: separated list of expander rules>

Expander rule definition
<control subset>,<expand subset>,<continue 0|1>,<start>,<limit>

List definition
<name>;<guid>;<1 - global | 2 - local>;<, separated list of varabiles and values, variabile and value is : separated>
or
<name>;<guid>;0;<$ separated list of tuples>;<, separated list of varabiles and values, variabile and value is : separated>

Tuple definition

<name>,<hide 0|1>,<: separated list of elements>,<calculation>,<: separated list of attribute names and rules. Name and rule are = separated>

Return value
Server returns document that can have up to 5 sections. If some section is empty, it’s omitted. Sections are [Axis 0], [Axis 1], [Axis 2], [Area], [Size]

[Axis n <indent list> <optional number of subsets | , separated list of dimension ids when mode 0x400 is used>]
List of tuples, where tuple size is count of dimensions on the axis. Each element in tuple is on 2 lines. First line is same as in /element/info without show_permission. Second line is <alias>[:<additional attribute values>];<path>[:<parent>];<parent paths>;
These 2 lines can be replaced by '#' if element is the same as in previous tuple. If compression is set in mode first line can be replace by #row;indent;depth; and path in second line can be replace by #row
Path is filled only when sorting filter was defined with flag PATH(0x80000) or NAME_PATH(0x400000).
Indent list is comma separated list of indents defined in stored filters, if the subsets doesn’t have stored filter, then its position in the list is empty. For example: There are 3 subsets on the axis 1 and second subset contains stored filter with indent 1. Then the header will look like this: [Axis 1 ,1,]
If subset names flag was specified, line with subset names is returned every time some subset changes. It's comma separated list of colon separated pairs of name and bool showing if subset uses parent paths in curly brackets. Only parts that changed are filled.

[Area]
List of non empty cells in the view. Same format as used in /cell/area with show_rule=1 and show_lock_info=1.

[Size]
; separated list of full axes sizes.

[Paging]
List of paging info for subset expanders with paging defined
<axis>;<row>;<column>;<page>;<number of pages>;

[Errors]
List of errors encountered during view calculation.
<subset name>;
<type>;<message>;<details>;<commit number>;

[List]
Information about key translations for list ; separated. First is list element followed by either element names in original cube or their position there

[Cube]
Returned for mode 0x400
<view name>;<number of dimensions>;<; separated list of dimension names>;<; separated list of translations>;<when mode 0x800 is used ; separated list of 0|1 1 when default subset was used>
Translation
Normal dimension - translated dimension name
Virtual attribute dimension - <linked dimension translated name>:<linked dimension name>:<attribute name>:<attribute translated name>