Development > Business intelligence > Setup > Synchronisation 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

SEEREFERTTO Refer to documentation Implementation

Screen management

Header

Presentation

The rule can easily be identified by a single code.

Close

 

Fields

The following fields are present on this tab :

This code identifies the created records in a unique manner.

  • Title (field ZINTIT)

It used to define a name associated with each record.

  • Deactivation (field DESFLG)

Close

 

Tab Application table

Presentation

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.

Close

 

Fields

The following fields are present on this tab :

Characteristics

An activity code is used to:

  • make optional an element in the dictionary if the value associated with the activity code is null.
  • identify the specific/custom elements if they are marked with a code starting with X, Y or Z.
  • size a maximum number of lines when the activity code marks elements from a grid.

In this way, if the activity code is disabled, the marked element will not be useable, and the associated code (if any) will neither be generated nor can be activated.

  • Module (field MODULE)

 

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 to 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 :

  • 1,1 : in this case, a line in the source table can trigger the creation or the update of a line in the facts table in the datamart (if the condition expressed in the filter field is verified).
  • 1,N : in this case, a source table line can trigger the creation or update several lines in the facts table from the datamart (as a function of the dimension N for a grid identified by one of the fields in the table). The variable index varies between 0 and N-1, and the update is triggered for each value of the index for which the line condition is verified.
  • 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 :

  • the line condition is evaluated (which can depend on the variable index).
  • if it is true, all the destination formulas are evaluated to obtain the values for the fields to be updated.
  • the record in the corresponding datamart is updated.
  • 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.

Table 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.

Table 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.

Close

 

Tab Fact table

Presentation

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.

Close

 

Fields

The following fields are present on this tab :

Block number 1

Corresponds to the facts table for the datamart that the rule is used to load.

Table

  • Line number (field NUMDES)

 

  • Field (field FLDDES)

Corresponds to the different fields in the facts table that must be loaded.

  • Title (field INTDES)

Title associated to the previous code.

  • Formula (field FORDES)

Calculation formula whose evaluation is used to obtain the value to be assigned to the field in the facts table.

By default, if a field exists in the source table corresponds to that of the field in the facts table, the corresponding formula is automatically proposed.

Close

 

Specific Buttons

This function is used to generate a processing that contains tables and join declaration labels. This processing, whose code is 'WMB' followed by the rule name, is automatically called during the execution of the synchronization rule.

The following fields are present on the window opened through this button :

Block number 1

  • field OBJET

 

  • field CLES

 

Block number 2

  • From folder (field DOSORG)

This field is used to define the folder from which the record is going be copied. The possible syntaxes are described in the dedicated appendix.

  • All folders (field TOUDOS)

This option is used to copy the record to all the folders defined in the dictionary (ADOSSIER table from the current solution).

  • To folder (field DOSDES)

This field used to define the folder in which the record is going be copied. The possible syntaxes are described in the dedicated appendix.

Close

This button is used to copy the record definition from or to another folder.

Menu Bar

Documentation / Paragraphs

This function is used to access the documentation management on the first paragraph of the documentation (if there is one) associated to the current record.

Documentation / Links

This function is used to access the links management. It is used to define the links between the current and other records (for example the links between functions and setups). These links are specific to the documentation and are used to load the generation of documentation structures.

Documentation / Generation

This menu is used to launch a documentation generation. The generation can also be launched from the [Generation] button at the bottom of the window.

Three types of generation can be launched one by one or simultaneously:

  • the generation of the documentation structure from the dictionary (tables ADOCUMENT, ADOCBLB, ADOCCLB).
  • the generation of the documentation from the previous tables.
  • the generation of the field documentation.

The range suggested by default takes into account the current record but it can be modified upon launch.

Error messages

The only error messages are the generic ones.

Tables used

SEEREFERTTO Refer to documentation Implementation