Synchronization rules
This function is used to specify according to which way the datamart fact tables must be filled. A fact table can be filled by one or several rules.
A rule specifies according to which way the data are extracted from the software data base (in a first tab) and the association between the fields of the datamart and a formula used to calculate its value according to the extraction context (in a second tab).
Prerequisites
Refer to documentation Implementation
Screen management
Header
The rule can easily be identified by a single code.
Rule (field CODREG) |
This code identifies the current record in a unique way. |
Description (field ZINTIT) |
Deactivation (field DESFLG) |
This flag is used to desactivate a synchronization rule. A part of the data can be loaded. Warning: a synchronization will be need when the rule is reactivated. |
Tab Application table
The way the data are extracted is defined in this tab.
This is carried out by describing:
- an original table and the tables linked (see some on line tables)
- a condition is used to filter the data.
It should be noted that a trigger record can lead to the update of several datamart records (rule of 1,N type); in this case, a variable can varyindex from 0 to N-1, N being the dimension of the trigger field associated to this rule.
Characteristics
Activity code (field CODACT) |
An activity code is used to:
If the activity code is disabled:
|
Module (field MODULE) |
Origin table (field TABORG) |
Defines the principal table from which the data is extracted from the current folder to load the lines in the datamart. |
field LIBORG |
Title associated with the previous code. |
Filter (field FILTRE) |
Used to define a criterion in the form of a logical expression can be used to intervene in all the on-line tables, the constants and the functions. Only the lines for which the condition evaluation returns a result that is not null (i.e. true) are involved in the data extraction. |
Key (field INDLEC) |
It defines the table key code used to read the linked lines. By default, the first key of the table is used. |
Standard script (field TRTSTD) |
Vertical script (field TRTSPV) |
Specific script (field TRTSPE) |
Creation rule
Creation rule (field TYPLNK) |
This field can take two values :
|
Triggering field (field FLDDEC) |
When the synchronization rule is of the type (1,N), this field from the principal table is used, which is supposed to be dimensioned (several occurrences). The extraction algorithm is thus used to access the data in the grids stored in the principal on-line table. The principle is as follows : there is the possibility to vary the system variable index from 0 to N-1, N being the dimension of the triggering field and for each value :
|
Line condition (field CNDLIG) |
This condition is defined in the form of a calculation formula. It is evaluated on each iteration carried out on the number of occurrences of the triggering field (the variable index varying from 0 to N-1, N being the dimension of the triggering field). Other than the variable index, it can reference the fields in the on-line tables, as well as the constants, the global variables, the function defined by the programmer (syntax func PROGRAMME.FONCTION). If the result of the evaluation is not null, the update is triggered. |
Grid Links
Linked tables (field TABLNK) |
It identifies the table linked to the table of origin. |
Abbreviation (field ABRLNK) |
It corresponds to the abbreviation under which the linked table is open. If this field is not populated, the default abbreviation of the table is used. It is particularly useful to enter an abbreviation if the table appears several times in the grid, since several linked lines in the same table need to be on line simultaneously. |
Link key (field CLELNK) |
It defines the table key code used to read the linked lines. By default, the first key of the table is used. |
Type (field TYPLNKTAB) |
Link expression (field EXPLNK) |
This field is defined as one or more calculated expressions separated by a semi colon. Each expression is evaluated, and the result used to identify the value of the key used to perform the join. When multiple joins are authorized, only the first elements of the key can be given. In the expressions, constants can be used, as well as fields coming from the tables previously defined in the link list. It should be noted that the link expression can be empty. In this case, the table is simply on-line without the current records being read. This can be useful if for example a function defined by a developer (syntax func PROGRAMME.FONCTION) is used. This function can be used to read the information in tables of this type. |
Grid Folders
Folder (field ADXDOS) |
The folders are defined here from which the data will be copied. The possible syntaxes are described in the dedicated appendix. From the time of the copy, the variable GDOSSIER gives the folder code from which the data is extracted. |
Tab Fact table
This screen is used to define the fact table to update and the values associated to each field of this table in the form of formulae that can require the intervention of all the on line data, global variables, constants as well as functions defined by the user. If the creation rule is of 1,N type, the intervention of the index variable can also be required in the formulae.
Block number 1
Destination table (field TABDES) |
Line number (field NUMDES) |
Field (field FLDDES) |
Description (field INTDES) |
Formula (field FORDES) |
Specific Buttons
Copy
This button is used to copy the record definition from or to another folder. Block number 1
Block number 2
|