...
Method | Usage |
---|
convert
| Returns a list of elements spliced by all directives that apply either by regular expression or to entire dimension. The list of elements is created by running QueryRollback associated with each splicing directive as defined in fpm.json configuration file. |
TM1SpliceConfigContainer
(class in TM1SpliceConfigContainer.py
)
This class is used to consolidate content of all Splicer config files (fpm.json
, connection.json
and kpi_template.json
) into a single object. Access to the config files content is provided through various methods the class exposes.
The class defines following attributes:
Attribute | Type | Usage |
---|
log
| Logger
| Return logger object configured for the Splicer instance. |
rule_config_file
| str
| Complete path and filename pointing to fpm.json . The file contains catalog of MDX queries associated to each splicing directive, list of cubes which are spliced and list of cubes requiring splicing of KPIs. |
server_config_file
| str
| Complete path and filename pointing to connection.json . The file contains connection and credentials information in TM1Py dictionary format for the target TM1 instance. |
kpi_config_file
| str
| Complete path and filename pointing to kpi_template.json . The file contains templates for KPI calculations that can be injected into cubes requiring splicing of KPIs. |
paths_config_file
| str
| Unused. |
dimensions
| List[str]
| List of dimension names to achieve reduction in scope of splicing to necessary minimum. If supplied the splicing will be reduced to cubes containing the dimensions contained in the list. |
no_preprocess
| bool
| If set, the splicer won’t call any TI processes before commencing splicing. |
no_postprocess
| bool
| If set, the splicer won’t call any TI processes after splicing was finished successfully. |
rule_config_data
| Dict[str, Union(Dict, List)]
| Internal store for data loaded from fpm.json config file. |
server_config_data
| Dict[str, Dict[str, str]]
| Internal store for data loaded from connection.json config file. |
results_data
| Dict[str, Dict]
| Internal store for data returned by running Query or QueryRollback for each directive. |
temp_results_data
| Dict[str, Dict]
| Internal store for data returned by running Query or QueryRollback for each directive. |
kpi_config_data
| Dict[str, Union(Dict, List)]
| Internal store for data loaded from kpi_template.json config file. |
paths_config_data
| Dict[str, str]
| Paths used to store rule proposals and backups. |
The class exposes following methods:
Method | Usage |
---|
load_paths_config
| Unused. |
load_rule_config
| Load rule_config_file into rule_config_data internal store. |
save_rule_config
| Save rule_config_data into rule_config_file . |
load_server_config
| Load server_config_file into server_config_data internal store. |
writeback_results
| Store splicing results in results_data internal store for current splicing. |
writeback_prior_results
| Store splicing results in results_data internal store for prior splicing. |
register_results
| Store splicing results in temp_results_data internal store for current splicing. |
historize_prior_results
| Fill temp_results_data with current results_data . |
get_rule_config_data
| Exposes rule_config_data internal store properties. |
get_rollback_mdx_query
| Exposes QueryRollback node from rule_config_data store (fpm.json ) for given splicing directive and dimension. The rollback query is used to construct list of elements for reverse splicing directives when desplicing rules. |
get_mdx_query
| Exposes Query node from rule_config_data store (fpm.json ) for given splicing directive and dimension. The query is used to construct list of elements for splicing directives when splicing rules. |
get_on_empty_set
| Exposes On_Empty_Set node from rule_config_data store (fpm.json ) for given splicing directive and dimension. The node can either contain an MDX query or @Error tag that will generate exception and terminate splicing. |
get_mdx_results
| Exposes prior or current MDX query results for given splicing directive and dimension. |
get_dimensions
| Returns a list of dimensions for which the splicing was required. |
get_cubes
| Returns a list of cubes from Cubes node in rule_config_data store (fpm.json ) |
get_kpi_only_cubes
| Returns a list of cubes from KPI_Only_Cubes node in rule_config_data store (fpm.json ) |
load_kpi_config
| Load kpi_config_file into kpi_config_data internal store. |
get_kpi_code_template
| Returns code templates stored in code_template node of kpi_config_data (kpi_template.json ). The templates are used to generate the KPI calculation rule. |
get_kpi_suppress_gen
| Returns a list of KPI calculation formulas excluded from KPI rule code generation from suppress_gen node of kpi_config_data (kpi_template.json ). The list is used for calculations that can be provided with a simple rollup rather than a calculation formula to optimize KPI calculations. |
get_kpi_db_template
| Returns a template used to generate entire DB statement for a KPI formula. The templates are retrieved from DB_template node of kpi_config_data (kpi_template.json ). |
get_kpi_preprocess_ti
| Returns a list of processes to run before splicing or desplicing from preprocess_TI node of kpi_config_data (kpi_template.json ). |
get_kpi_postprocess_ti
| Returns a list of processes to run after splicing or desplicing from postprocess_TI node of kpi_config_data (kpi_template.json ). |
get_path_rule_backup
| Returns a path for rule backups. Backups are provided before any rule modifications. |
get_path_rule_proposals
| Returns a path for rule proposals. Rule proposals are saved before patching a cube with spliced rule, these might be used to troubleshoot any splicing issues resulting in syntax errors happening during patch attempt of the spliced cube rule. |