Containers (package)
The package contains classes representing Splicer specific functionality for resolving splicing and desplicing directives within each parsed rule context. The Objects sub-package contains implementation of splicing and desplicing directives and regions.
TM1DirectiveContainer
(class in TM1DirectiveContainer.py
)
This class stores all directives that apply to a single TM1 rule or a feeder command. It also contains convert
helper method to provide support when splicing dimensional elements of the TM1 rule.
The class defines following attributes:
Attribute | Type | Usage |
---|---|---|
|
| Link to an instance of TM1SpliceExecutor. |
|
| Global position of the |
|
| Dictionary of directives that apply to all elements of a dimension/hierarchy. |
The class exposes following methods:
Method | Usage |
---|---|
| Adds a directive to list of directives. |
| Returns a list of all dimensions extracted from all directives. |
| Returns a list of directives related to a specified dimension. |
| Returns a list of directives related to a specified dimension or empty list if dimension is not within scope of any directive. |
| Returns flag indicating the specified directive targets entire dimension regardless regular expression filter. |
| 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 |
TM1DirectiveResolver
(class in TM1DirectiveResolver.py
)
The class is implementing mechanism to select a list of directives applying to certain TM1 rule command or a feeder command out of all available directives in the TM1 rule file. The mechanism is using region membership (scope) of each rule or feeder to select proper list of directives. The directives are selected according to priority given by distance of the rule or feeder command from each region start.
The class defines following attributes:
Attribute | Type | Usage |
---|---|---|
|
| Link to an instance of TM1SpliceExecutor. |
|
| Dictionary of directives applying to region, indexed by region name. |
The class exposes following methods:
Method | Usage |
---|---|
| Adds a directive to dictionary of directives |
| Called by parser whenever a directive is found during parsing of the TM1 rule file. Creates a new directive and appends it to the internal dictionary. |
| Returns a new instance of |
| Resolves and applies directives to an area statement of a TM1 rule or feeder command. |
| Functionality was removed, originally served to store last splicing results in a file to be able to rollback to previous rule state. |
TM1RegionContainer
(class in TM1RegionContainer.py
)
The class is used to store global list of regions defined throughout the TM1 rule file. Regions play important role when calculating scope of splicing directives to certain TM1 rule or feeder command.
The class defines following attributes:
Attribute | Type | Usage |
---|---|---|
|
| Dictionary of all available regions defined in the TM1 rule file indexed by region name. The value is |
The class exposes following methods:
Method | Usage |
---|---|
| Adds a region to internal |
| Creates a new region and sets its start index (by characters counted from beginning of the file) according to parser. |
| Creates a new region and sets its end index or if the region already exists, updates its end index. Index is counted by number of characters from beginning of the file. |
| Returns a list of regions that enclose specified string area by |
| Returns a list of all |
| Returns lowest available |
| Returns highest available |
TM1RegionStore
(class in TM1RegionContainer.py
)
This class stores all instances of a region in the TM1 rule file.
The class defines following attributes:
Attribute | Type | Usage |
---|---|---|
|
| Name of the region. |
|
| List of all instances of the region within the entire TM1 rule file. |
The class exposes following methods:
Method | Usage |
---|---|
| Adds a region instance into the internal |
| Returns last instance of a |
| Returns all contained |
| Returns |
TM1ReverseDirectiveContainer
(class in TM1ReverseDirectiveContainer.py
, derived from TM1DirectiveContainer
)
This class stores all reverse directives that apply to a single TM1 rule or a feeder command. It contains redefined convert
helper method for reverse splicing of rules.
The class exposes following methods:
Method | Usage |
---|---|
| 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 |
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 |
---|---|---|
|
| Return logger object configured for the Splicer instance. |
|
| Complete path and filename pointing to |
|
| Complete path and filename pointing to |
|
| Complete path and filename pointing to |
|
| Unused. |
|
| 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. |
|
| If set, the splicer won’t call any TI processes before commencing splicing. |
|
| If set, the splicer won’t call any TI processes after splicing was finished successfully. |
|
| Internal store for data loaded from |
|
| Internal store for data loaded from |
|
| Internal store for data returned by running |
|
| Internal store for data returned by running |
|
| Internal store for data loaded from |
|
| Paths used to store rule proposals and backups. |
The class exposes following methods:
Method | Usage |
---|---|
| Unused. |
| Load |
| Save |
| Load |
| Store splicing results in |
| Store splicing results in |
| Store splicing results in |
| Fill |
| Exposes |
| Exposes |
| Exposes |
| Exposes |
| Exposes prior or current MDX query results for given splicing directive and dimension. |
| Returns a list of dimensions for which the splicing was required. |
| Returns a list of cubes from |
| Returns a list of cubes from |
| Load |
| Returns code templates stored in |
| Returns a list of KPI calculation formulas excluded from KPI rule code generation from |
| Returns a template used to generate entire DB statement for a KPI formula. The templates are retrieved from |
| Returns a list of processes to run before splicing or desplicing from |
| Returns a list of processes to run after splicing or desplicing from |
| Returns a path for rule backups. Backups are provided before any rule modifications. |
| 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. |