Nodes and fields are contained within the schemas that are specified either during activity configuration or in the transformation. While configuring a transformation, nodes and fields are displayed the same regardless of the transformation display mode.
Node and Field Notation
Each node or field is displayed with these components:
- Cardinality key for nodes and fields
- Name for nodes and fields
- Data type for fields only
- Attribute and value indicators (if applicable)
For example, the field below has a cardinality key of
[0, 1], a name of
id, and a data type of
Cardinality keys notate the relationship for nodes and (if the key is present) fields. The notation is derived from the concept of multiplicity as used in Unified Modeling Language (UML).
|Nodes only||One and only one element is valid.|
|Nodes only||One or more than one element is valid.|
|Nodes or fields|
Zero or one element, value, or attribute is valid. This key means that a given node or field is effectively optional.
|Nodes only||Zero or more elements is valid.|
Each node or field has a name that comes directly from the data schema.
Each field has an associated data type, such as
Attribute and Value Indicators
Some types of structures, such as XML or SOAP, may have additional symbols that represent whether a field is a value or an attribute. Elements, represented by nodes, do not have any visual indicators. Elements may have one or more other elements, attributes, values, a combination of these, or none depending on the cardinality key.
|@||Attribute as represented by a field. This field is used to indicate a node has an attribute, and may or may not also have a value. There may also be more than one attribute for each node.|
Value as represented by a field. The field is used to indicate a node has a value and zero or more attributes.
Node and Field Example
This example shows a node (
color_swatch) with a cardinality of zero or more elements, that has both a value field (
text) that is required and an attribute field (
image) that is optional:
Reference Path Notation
When a source object is mapped, its individual reference path is inserted into a script on the target field. In most use cases, as these paths are automatically constructed, it is not necessary to know how to manually construct them. This information is provided as a reference to aid in understanding how these paths are constructed.
There are cases where you will need to understand how these paths are constructed, such as in the use of reference paths with Instance Functions. In cases where a required input parameter for an instance function is an array, a hash symbol (
#) can be inserted in the reference path of a data element to return an array of data as opposed to a single field. For more information, see Insertion of a Hash to Return an Array under Instance Functions.
For reference, the syntax used for the path of the object uses these symbols:
Square brackets are used to enclose a node path.
|A path without square brackets is a value or attribute field.|
|Separators||A period following a node name indicates it is a loop node.|
|A dollar sign following a node name is used to indicate a |
|Loop Nodes||A hash sign-period following a node name indicates that an array for the record value fields will be returned. This notation can be used only on loop node names.|
A hash sign followed by an integer returns the one-based index item of an array.
|Complex CSV Structures||_||An underscore preceding |
As an example, the following table has sample paths for a complex CSV data structure. The paths for other structures follow the same format except that
_Root is not present for other data structures.
Node paths are shown with a yellow background, while field paths are shown with a green background. A source can be mapped to an attribute or value field of a target. Though target nodes can have conditions applied on them, sources cannot map to them. Source node and field paths can be used in target node conditions and target field mappings.
|Data Structure||Qualified Path||Meaning|
|Sub-nodes use the reference of any preceding nodes, followed by the node name. The ending dollar sign indicates a |
|A value field is not enclosed within square brackets, but still uses the reference of any preceding nodes, followed by the value name.|
|Sub-nodes use the reference of any preceding nodes, followed by the node name. The ending period indicates a loop node.|
|An attribute field is not enclosed within square brackets, but still uses the reference of any preceding nodes, followed by the attribute name.|
A value field is not enclosed within square brackets, but still uses the reference of any preceding nodes, followed by the value name. This specific example shows a hash sign preceding the loop node period, indicating that an array of the "Detail" record values will be returned.
A value field is not enclosed within square brackets, but still uses the reference of any preceding nodes, followed by the value name. This specific example shows an indexed hash sign preceding the loop node period, indicating that the first element of an array of the "Detail" record values will be returned.
For additional information about data structures, mapped fields, loop nodes, and instance and multiple mapping, see Data Structures.
- No labels