- This line was added.
- This line was removed.
- Formatting was changed.
Depending upon whether your Transformation's source is XML, a Text Structure or a Database, one will see the following notation used when the structure is displayed in a tree format. The [E] notation is shorthand for that seen for text and database structure and is presented in the table below.
|[E+]||One or More Elements|
|[E?]||Zero or One Element|
|[E*]||Zero or More Elements|
|[V]||An Element Value|
|[A]||A Required Attribute|
|[A?]||An Optional Attribute|
The various [E] nodes are all represented by folders in the mapping tree. The user maps to or from the [V] and [A] nodes.
When referencing these elements within a script, a qualified path is used for the element name and appear as below for the following trees:
The [EV] and [EV?] are used in the special case where an element is either [E] or [E?] (that is there can be at most one element), and the element does not have any attributes.
EXAMPLE 1:There is an optional element called "Time". First, assume that this element only has a value of type string. Then it will appear as a single (non-folder) node like this in the tree
When viewing or editing a transformation, you can see the instance code for each node or field as defined in the source or target structure to help you make an accurate mapping of fields. Depending upon your source and/or target data structure, instance codes consisting of elements, values, and attributes, along with any modifiers, are displayed next to each node or field name.
Elements, Values, and Attributes
[E] nodes are all represented by folders in the source or target mapping structures. The user maps to or from the
XML, JSON, NetSuite, Salesforce
Element. In Jitterbit, elements are represented by nodes. Elements may have one or more other elements, attributes, values, a combination of these, or none depending on the modifiers.
|Value. In Jitterbit, values are represented by fields. If a node has a value, it will also have at least one attribute. If it does not have an attribute, it will be represented as |
|Attribute. In Jitterbit, attributes are represented by fields. If a node has an attribute, it may or may not have a value field. There may be more than one attribute per node.|
Element value. In Jitterbit, these are elements that have a value but do not have any attributes and are thus represented by fields rather than nodes.
|NOTE: The letter codes in the above table are not used within text or database structures.|
Modifiers notate the relationship for nodes and sometimes fields as detailed in the table below.
XML, JSON, NetSuite, Salesforce
|Complex text or database||Meaning|
|(no modifier)||One and only one  element is valid. Only nodes can have this modifier.|
|One or more than one [1+] elements are valid. Only nodes can have this modifier.|
Zero or one [0,1] element, value, attribute, or element value is valid. Both nodes and fields can have this modifier, which effectively means the node or field is optional.
|Zero or more [0+] elements are valid. Only nodes can have this modifier.|
When modifiers are used with elements, values, and attributes, consider the following examples:
Assume there is an optional element called "Time." Then assume that this element has a value of type string, and does not have any attributes. Then it will appear as a field as follows:
[EV?] Time (String) EXAMPLE 2:
The user can then map directly from the
If the "Time" element also has an attribute, e.g.
the element would be represented bythe following three nodes in the tree
a node, with value and attribute fields displayed within the node:
In this casethe
node would appear as a folder in the tree, and the user would map to or fromthe
Reference in a Script
When referencing the elements, values, and/or attributes within a script, qualified paths are used. The qualified path is what appears within the
<trans> </trans> tags in a Jitterbit script when referencing the specific node or field. The following symbols are used within the notation to signify the following:
Square brackets are used to enclose nodes. However, note that node paths cannot be mapped directly; only fields can be mapped.
|A period following a node name indicates a loop node.|
|A dollar sign following a node name is used to indicate a |
|A hash sign following a node name indicates that an array for the record value fields will be returned. This notation can be used only following a loop node before the period.|
|_||An underscore preceding |
The following sample paths are for a complex CSV data structure. The qualified paths for other structures follow the same format except that
_Root is not present for other data structures.
|NOTE: Not all possible combinations are shown, but can be constructed referencing the table above.|
|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. This field path can be used for mapping.|
|Sub-nodes use the reference of any preceding nodes, followed by the node name. The ending period indicates a loop node. Node paths cannot be mapped.|
|An attribute field is not enclosed within square brackets, but still uses the reference of any preceding nodes, followed by the attribute name. This field path can be used for mapping.|
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. This field path can be used for mapping.