Attributes target structure

Attributes for nodes (target structure)


Attribute

Description

Name

Description

Name of the node and optional description (multi-line). See also section Naming conventions for nodes and fields.

XML/JSON handling

See sections XMLNoTemplateUnit, create xml from node(a, b, c, d, e, f, g), JsonCreationUnit and ExtendedJsonCreationUnit.

Minimum

Maximum

Checks the minimum and maximum occurrence of a node.

Inactive

An inactive node is not entered/generated when the target tree is generated.

Only for SQL

If this option is set, the node will not be displayed in the output data. Nodes of this type are only for the interaction with databases.

Iteration node

Only the last iteration of the node is output. See section Iteration Nodes and Calculation Fields.

Path

You can either drag a source structure node onto this target structure node. In that case, the name of the source structure node is automatically entered in this attribute field. Or you search for the source structure node in a list using the folder icon. Alternatively, you can enter the name manually. In addition, you can also use the blue folder icon to select a source structure node or an Integer variable. Note: See also section Records and Paths, Path Types.

Is relative path

See also attribute "Path" and section Repetitions of Target Structure Nodes by Source Structure.

Iteration

See section Processing order of nodes.

Optional settings

See sections MultipleFileCreatorUnit and X12CreationUnit.

XML namespace

This property allows an XML namespace to be assigned to the XML element generated from the field. See also sections XMLMemSaveTemplateParserUnit and XMLNoTemplateUnit.

Line break

See section New Line for CSV/Fixed Length.

Sort field

Sorting

See section Sorting in nodes.

Optional XPath filter

Only relevant for the XML parser V4.

Advanced settings


You can access the advanced settings via checkbox "All".


Attribute

Description

Transaction control

Database alias

SQL table/procedure

Empty table

Optional pre-SQL execution

SQL mode

See section Phase 4 - SQL Execution.

Optimize path

If this attribute has the value No, the usually active path optimisation will be deactivated. If a child node in the target structure has the same path as its parent node and its attribute Is relative path has the value No, this node will only appear once in the target tree if the optimisation is enabled. If the optimisation is disabled, the node appears in the target structure as often as it appears in the source structure.

Row offset variable

The value of the Integer variable specified in this field determines how large the offset for the nodes to be output in the target tree is. An offset of 2, for example, means that only the second node (and the following) will appear in the target tree. This attribute only works if the attribute "Optimize path" has the value "No".

Step size variable

The value of the Integer variable specified in this field determines how large the step size for the nodes to be output in the target tree is. With an offset of 2 and a step size of 2, the nodes 2, 4, 6, etc. are output in the target tree.

Attributes for fields (target structure)


Attribute

Description

Name

Description

Name of the field and optional description (multi-line). See also section Naming conventions for nodes and fields.

Calculation field

Indicates whether a field will be included in the output data or if it is only traversed for calculation purposes. See also sections "Calculation Fields" below.

Mandatory field

If a field is marked as a mandatory field, an error is generated if the field has an Empty Flag. Whether a mandatory field has been filled can be checked in a mapping test with option "Perform min/max checks".

Fix value

You can specify a fixed value for a field. See also section "Order of value assignments".

Data type

The data type of the field.

Length

For data with the document type "Fixed-length", the value specified here defines the length of the field (so when this fields end and the next one starts). For data with the document type "CSV", the content of the field is shortened to the length entered here (if the attribute has the value 0, the content will not be shortened at all).

Template

Use template

You can specify a format template. At the moment, the template is only evaluated if the data type is numeric or Date/Timestamp and the field actually has a value. The template is evaluated in the same way as the function format date/timestamp to text(a, template b, [Locale c], [Timezone d]), where b is the template. The template will be applied to the field after the last value assignment and if the attribute "Use template" has the values "Yes".

See also section Format templates for dates and times.

Fill with

The character to be used to fill the field value up to its specified length. If more than one character is specified, only the first one will be used.

Fill from left

Specifies whether to fill from the left ("Yes") or from the right ("No").

XML namespace

This attribute allows an XML namespace to be assigned to the XML element generated from the field. See also the Integration Units XMLMemSaveTemplateParserUnit and XMLNoTemplateUnit.

Name for logging

The string <Field name> (<Name for logging>) Assigned value is '<mapped value>' will additionally appear in the job log if attribute "Log field value" is set to "Yes".

Log field value

If set, the value assigned to the target field will be logged (starting with the string "Assigned value is"). You can use the advanced search in the Control Center to specifically look for those entries. An application example would be to log order numbers and later look for jobs that processed a certain order. It is then no longer necessary to search in the input data. See also attribute Name for logging.

Optional XPath filter

Only relevant for the XML parser V4.

Advanced settings


You can access the advanced settings via checkbox "All".


Attribute

Description

SQL column name

SQL key

SQL AutoGenKey

Skip empty SQL value

These settings are only relevant for phase 4.

Calculation fields


See also section Iteration Nodes and Calculation Fields .


Sometimes it is necessary to perform calculations in the mapping, whereby the affected substructures must not be visible in the output data. Note: Calculation fields are displayed in mapping tests and are also used for phase 4 (SQL) .

Example: The number of order items must be specified in the header data of an order. The count is determined with a variable by creating a counting node with a path to the Position node in the source structure. The counting node contains a field counterPos that increases the counter with each iteration with a function. We do not want this part of the target structure/tree to appear in the output data. This can be achieved by setting the attribute Calculation field to Yes for the field.

The following figure shows the effect of calculation fields on the target tree.


images/download/attachments/164333083/Berechnungsfeld-version-1-modificationdate-1734669606636-api-v2.png


(1) We create a new node counting above the node OrderHeader in the target structure. The node gets the same value for attribute "Path" as node Position. This repeats node counting as often as node (4).

(2) We create the field counterPos. The attribute "Calculation field" is set to "Yes" for this field. We use function calculate and save variable() on this field with parameter a=var__COUNTERPOS, b=+ and c=1. This will increment the value of variable var__COUNTERPOS each time the function is executed. So after the last iteration, the value of the variable will be equal to the number of order items.

(3) We create the field positions. We use function copy() with parameter a=Variable var__COUNTERPOS. So the field will contain the number of positions.

(4) Node Position (in the target structure) with a path to node Position in the source structure.

(5) Node counting will be iterated as many times in the target tree as node Position. Since there is no 'real' field in this node, it will be ignored when the output data is created.


It is also possible to mix calculation fields and normal fields in any order within nodes. However, nodes containing normal fields will no longer be ignored when output files are created.