Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

TM1Directive (class in TM1Directive.py)

This class represents single splicing directive from parsed TM1 rule file.

The class defines following attributes:

Attribute

Type

Usage

scope

str

Name of region in which the directive applies.

directives

Dict[str, str]

Dictionary of associated regular expressions that define splicing set of the splicing directive indexed by dimension.

catalog_key

str

An ID to lookup a Query, QueryRollback and On_Empty_Set nodes from fpm.json config file through TM1ConfigContainer methods get_mdx_query, get_rollback_mdx_query and get_on_empty_set.

The class exposes following methods:

Method

Usage

get_scope

Returns scope.

get_dimensions

Returns a list of dimensions that the directive applies to.

get_hierarchies

Returns a list of hierarchies of specified dimension that the directive applies to.

get_elements

Returns a list of elements (regular expression) associated with specified dimension of the directive.

get_mdx_applies

Returns a flag if all of elements related to specified dimension should be spliced. This applies when a special tag @mdx was supplied instead of element regular expression.

get_mdx_key

Returns catalog_key.

applies

Returns a flag if the directive applies to supplied dimension and element list.

get_matching_elements

Returns a list of all elements for supplied dimension a and list of elements, for which the directive is matching with the regular expression, if the directive was specified with @mdx tag, it will return all elements.

TM1Region (class in TM1Region.py, extends TM1RuleToken)

The class represents a single region instance in the TM1 rule file. The region is considered as contents of the rule file between #Region and #EndRegion marks associated with the region.

  • No labels