The Mapping tab of the Amazon Connector allows you to define the mappings between the input data source (see the General Tab) and that required by the selected Amazon object and operation.
The aim of this tab is to define the links between the incoming data and the outgoing data that is to be sent to Amazon.
From here you can:
- Automatically map where input and output parameter names match
- Create mappings from a set of transform functions to change the data between input and output
- Use nested looping to support hierarchical data structures
- Import and export mappings so that they can be reused in other steps
The Object drop-down presents a list of functions available for selection within the Amazon Connector. The Operations drop-down presents the operations available for the selected Object.
The left-hand Input Data pane holds those data source fields available for mapping (see the General Tab). The right-hand Operation Data pane displays those fields for the selected Object and Operation combination.
Creating Mappings #
Create links by dragging and dropping a Input Data field onto its corresponding Operation Data field. Mandatory Operation Data fields are shown in bold.
BPA Platform formulas and variables can be included in the source data even when using a Task step or Custom schema — create a Fixed / Dynamic function for the formula or variable and link to the relevant Operation Data field.
Each operation has an additional field, SupplementaryReference
, which allows for traceability when transferring data from one place to another. When mapped, the data resides locally at runtime. It is added to the output, and creates a record for reference purposes only — you can choose to map any field to SupplementaryReference
to assist with checking where the data originated from or at what time the data transfer occurred, for example.
Resolving anyType Elements #
Fields marked with a blue down-facing arrow have been declared as anyType format in the XSD. If your Operation Data requires declared matching data types, you can resolve this here. Click blue down-facing arrow and select the relevant data type:
Using Functions #
The Mapping tab makes use of the Data Transformation Layer (DTL) feature of BPA Platform, where you can use available functions to manipulate the data. Use the Functions pane to add transformation functions.
Functions #
Aggregation — Aggregation functions define operations for specific nodes.
Node Count | This function counts the number of occurrences of a node in the source recordset or XML document. The result is then passed to the mapped Operation Data node. | |
Sum | This function calculates the total of the values from all iterations of an element in the source recordset or XML document. The sum of the values is used as the new value in the mapped Operation Data element. |
Data — Data functions perform operations on source data to generate new data to be passed to the mapped Operation Data element.
Fixed / Dynamic | This function passes a static or dynamic value to the mapped Operation Data field. Use a variable or recordset column to generate the dynamic data. | |
Run VBScript | Use this function to perform VBScript operations to process source data, generate data to be submitted in the call at runtime, or both. The resulting value is passed to the mapped Operation Data field. |
Lookup — Lookup functions are used to find values in a nominated source, by a key.
External Lookup | Use this function to lookup values from an external database. This uses existing Database Query (ODBC) or Database Query (OLEDB) global connections. | |
Internal Lookup | Use this function to find an alternative value for source data from a predefined lookup table. |
Looping — Looping functions loop through the source recordset or XML document to perform functions on all iterations of a node.
Interleaved Merge | This function loops through the source recordset or XML document and merges data from specified elements into a single occurrence for the mapped Operation Data element. | |
Simple Loop | This function loops through the source recordset or XML document and creates an Operation Data node for every iteration of a source node it finds. | |
Split by type | Use this function to take data from a single source node and split it into two or more Operation Data nodes dependent on a nominated identifier. |
Additional Functionality #
In the Transformation Mappings pane, click:
to import and use an existing mappings file (.DTLX
) from a previous task. Note that the selected Object and Operation for the tool step, as well as the Input Data and Operation Data schemas must be identical to that used in the .dtlx file for an import to be successful.
to export the current mappings for use in another task or as a backup (.DTLX
).
to reset all current mappings.
to delete the highlighted mapping.
to delete the highlighted function.
Refreshing the Tool Object Schema #
Use Schema Refresh to reflect any changes made to the object and operation schema following any change made to the structure of your mapped objects — Ensure that Update objects and operations option has been selected on the General Node in the Global Configuration (see the General Node).
Further Mapping Controls for an Element #
You can further control how incoming mapped data is processed for each mapped element, for example, if expected data is missing. To do this, right-click the required element and select Options:
If the input source XML is missing this mapped element (mapped so therefore is required), use the options in the If mapping cannot be made due to missing data pane to control the Amazon Connector‘s behaviour.
If the input source XML contains the mapped element but has no value, that is, received as either or
, use the options in the If mapping cannot be made due to empty data pane to control the Amazon Connector‘s behaviour.
Both panes contain the same behavioural options:
- Create Empty Element — Send
to Amazon
- Create Element containing — If a missing element or data is received, always send the element with the value specified in the provided text box
- Don’t create Element — Don’t include the element in the XML sent to Amazon
- Error — At task runtime, the Amazon Connector step fails and an error is written to the BPA Platform Event Log
Continue with the Options Tab…