Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

If the patch action and rule check were successful the method will set the cube status in cubes_status store to True and will return without errors signalling to the caller to continue with a following cube rule.

...

TM1SpliceExecutor Properties and Methods

The class defines following attributes:

Attribute

Type

Usage

config

TM1SpliceConfigContainer

Instance of configuration container to retrieve config data from (Containers (package) ).

tm1

TM1Service

TM1Py connection object to access target TM1 instance.

parser

Parser

Instance of parser (Parser/Grammar (package)) to be used to parse the rule.

kpi

Dict[str, str]

Dictionary of KPI calculation definitions retrieved from }APQ C3 FIN CoA Map to be used to generate KPI calculations in FPM-KPI region.

log

Logger

Logger to use to log into application.log, console and TM1 instance through TM1LoggingProvider

The class exposes following methods:

Method

Usage

get_tm1_connection

Creates a connection with target TM1 instance.

execute_mdx

A helper method to run a set MDX query, returns a list of elements.

execute_rollback_mdx_rule

A helper method to run a set MDX query stored with each directive in QueryRollback object in fpm.json, returns a list of elements.

execute_mdx_rule

A helper method to run a set MDX query stored with each directive in Query object in fpm.json, returns a list of elements.

rollback_rule_changes

Recovers a rule from a backup file located in rule subfolder and saves it on TM1 server.

desplice_cube_rule

Desplices an individual cube rule - see details provided above.

splice_cube_rule

Splices an individual cube rule - see details provided above.

get_parse_tree

Returns a parse tree from TM1RuleParser, the parse tree corresponds to the unchanged rule.

parse_text

Returns a spliced rule as string, the rule has been spliced.

run_ti_processes

A helper method to run a TI process, used to run TI processes before and after splicing.

get_cube_names

A helper method to compile a list of cubes depending on Splicer CLI settings.

get_element_parents

A helper method to return a list of parents related to a supplied element.

get_immediate_descendants

A helper method to return a set of immediate descendants of a supplied element.

clear_dirty_flag

A helper method to clear dirty flag values for all KPIs in }APQ C3 FIN CoA Map.

check_cubes_status

A helper method to check cube status of all cubes that were processed. If there is an error indicated for any of the cubes, the method will initiate rollback of the rule changes.

prepare_desplice_results

A helper method to prepare data by running QueryRollback MDX queries for desplicing.

desplice_cube_rules

Desplices all cubes depending on Splicer CLI settings.

splice_cube_rules

Splices all cubes depending on Splicer CLI settings.

register_results

A helper method to register results of splicing for a directive and dimension.

get_kpi_set

A method to retrieve a dictionary of KPI calculation definitions from }APQ C3 FIN CoA Map to be used to generate KPI calculations in FPM-KPI region.

generate_kpi

A method to generate content of FPM-KPI region based on kpi, returns a parse subtree.

disconnect

Disconnects a TM1 connection session.