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

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 an element optional 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

If the activity code is disabled:

  • The marked element will not be useable
  • The associated code will not be generated nor 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 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 :

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

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.

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.

 

Fields

The following fields are present on this tab :

Block number 1

 

Grid

  • Line number (field NUMDES)

 

  • Field (field FLDDES)

 

  • Description (field INTDES)

 

  • Formula (field FORDES)

 

 

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 included on the window opened through this button :

Block number 1

  • field OBJET

 

  • field CLES

 

Block number 2

  • From folder (field DOSORG)

Use this field to define the folder from which the record will be copied. The possible syntaxes are described in the Dedicated appendix.

  • All folders (field TOUDOS)

Use this option to copy the record to all the folders defined in the dictionary (ADOSSIER table of the current solution).

  • To folder (field DOSDES)

Use this field to define the folder to which the record will 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 menu item allows access to the documentation management on the first paragraph of the documentation (if there is one) associated with the current record.

Documentation / Links

This menu item allows access to link management. It is used to define the links between the current record and other records (for example, the links between functions and parameters). These links are specific to the documentation and are used to load the generation of documentation structures.

Documentation / Generation

This menu item launches a documentation generation. You can also launch it from the Generation button at the bottom of the screen.

You can launch three types of generation one by one or simultaneously

  • The generation of the documentation structure from the dictionary (ADOCUMENT, ADOCBLB, and ADOCCLB tables)
  • 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 you can modify it at launch time.

Error messages

The only error messages are the generic ones.

Tables used

SEEREFERTTO Refer to documentation Implementation