Data Mapping

The mapping of the loaded model data is set in the JSON format data conversion file.

The main objects of the data model are entities and lookups, each of which must be presented separately in the data transformation file. The object contains fields describing the main parameters necessary for integration, as well as arrays of internal objects (attributes and relationships) that make up the structure of the main one.

Entity objects should be combined into an array of registries (entities), and directories – into an array of directories (lookupEntities). Setting the model data match is required for the operation and exporting data.

The contents of the mappings are placed in the Definition content field of the export operation. In addition, the operation must contain a reference to the database (the database URL field).

Data export mapping

The mapping element of the first level can be:

  • entities – for entities;

  • lookupEntities – for lookup entities.

The mapping structure for describing entities/lookups is shown below.

Table 1. Mapping structure of data export operation

Elements

Values

Description

1 lvl

2 lvl

3 lvl

4 lvl

entities

Description entities

name

Entity/lookup entity name

@type

DB

Source system type

fields

Attribute for entities

name

Attribute name

@type

DB

Source system type

column

Database column for exporting information

updateMark

Update label

update MarkType

TIMESTAMP

Type of update label

@type

DB

Source system type

column

DB column for exporting information

source System Column

DB column to which the name of the record data source will be uploaded

multi Version

true, false

It is used when updating records with the same External ID (if any) 1

joins

SQL query to combine data

natural Key

ID of the record in the external system

@type

DB

Source system type

alias

Alias for the received key

column

Database column for exporting information

type

Type of attribute value 2

dqErrors Section

Data Quality Error Section

@type

DB

Source system type

table

Database table

external IdField

External ID field

status Field

Status field

ruleName Field

Name of rule field

message Field

Message field

severity Field

Field for the level of criticality of the rule

category Field

Category field

source System

Source system name

tables

Database tables to which the data will be exported

version Range

Description of validity periods

normalize From

true, false

Indication of normalization of the start date of the period 3

normalize To

true, false

Indication of normalization of the end date of the period 4

valid From

Valid from

name

Attribute name

@type

DB

Source system type

column

Database column for exporting information

type

“java.lang.String”, “java.lang.Integer”, “java.sql.Timestamp”

Attribute type

validTo

Valid to

name

Attribute name

@type

DB

Source system type

column

Database column for exporting information

type

“java.lang.String”, “java.lang.Integer”, “java.sql.Timestamp”

Attribute type

isActive

Indicates the activity of the period/record/reference 5

Примечания:

1

multiVersion - It is used if there are duplicates by the External ID of the record. This may be necessary to reload the accumulated and updated data. Or to update different periods of relevance within the same record.

  • False – when loading, the records will be perceived as different. Even if they have the same External ID.

  • True – multiple versions of the same record will be loaded as updates to the same record. If there is no obvious purpose for combining records, it is recommended to use false as a safer option. If the insertion order is important, you have to sort the records (relations). In this case, sorting does not affect the process of forming the etalon record. The parameter is used for records and all kinds of relations.

2

type (for naturalKey) - The attribute value type is specified from the java.lang package.

  • Time, date and date/time: java.lang.Date or java.lang.Timestamp.

  • Boolean: java.lang.Boolean.

  • String: java.lang.String.

  • Numerical: java.lang.Double.

  • Integer: java.lang.Integer or java.lang.Long.

  • File and text file are not imported or exported.

3

normalizeFrom - If set to true, the hours, minutes and milliseconds of the start date of the period will be reset to zero, i.e. reduced to the form: 00:00:00:000.

4

normalizeTo - If set to true, the hours, minutes and milliseconds of the end date of the period will be converted to the form 23:59:59:999.

5

isActive - It is necessary to be able to reduce the value of such a field to a Boolean value. Example: “isActive” : { “name” : “IS_ACTIVE”, “@type” : “DB”, “column” : “v.is_active”, “type” : “java.lang.Boolean” }