Generating Template Files

Version 22.0.8473


Generating Template Files

Version 22.0.8473


The first step in any XML Mapping is to upload template files representing the Source and Destination XML Structure. These samples can be generated within Arc in several ways.

Template Files from Transformation Connectors

Transformation connectors like X12, EDIFACT, and CSV automatically convert documents into XML. This allows the connectors to generate template XML files easily.

Upload Test File

Follow these steps to generate an XML representation of an input file:

  1. In the Input tab of a transformation connector, click the More dropdown and click Upload Test File.
  2. Navigate to a file on disk that you want to model as XML, select it, and click OK.
  3. Connect the EDI connector to an XML Map connector in the Flow. This connection can go in either direction—inbound to the XML Map connector, or outbound from the XML Map connector.
  4. Save the changes to your flow to confirm the structure of the connectors.

The XML Map connector automatically detects the structure of the test file. The file appears in either the Source File or Destination File drop-down menu of the XML Map connector.

Note:

  • Test files are only available in the XML Map connector if a compatible connector is linked to XML Map in the flow.
  • If you upload a test file to a connector and it does not appear in the linked XML Map connector, save the changes to your flow and check the XML Map connector again.

Manually Create a Test File

You can also manually create test files. Simply send a sample file through the transformation connector (EDI Connectors should be explicitly configured as ‘EDI-to-XML’ mode) to generate an XML output file. Download that output file and upload it again as the Source or Destination File in an XML Map Connector.

Template Files from Database Connectors

Database Connectors like the SQL Server Connector, MySQL Connector, and CData Connector automatically generate XML representations of their Input and Output mappings. Similar to EDI and CSV Connectors, after an Input/Output Mapping is saved in a Database Connector, any connected XML Map Connectors can automatically detect these XML structures.

To use a database Input/Output Mapping as a Source/Destination File, simply follow these steps:

  1. In the Database Connector, establish a working connection to the database.
  2. Create an Input or Output mapping and save changes (please see the documentation for the specific database connector for details).
  3. Connect an XML Map Connector to the Database Connector in the Flow. Save the Flow changes (the blue save icon in the bottom right).
  4. Find the Input or Output mapping as a Source or Destination File in the XML Map Connector settings.

Best Practices

XML Map connectors are typically in-between two other connectors in an Arc flow. It is usually best to generate template files with the two connectors surrounding an XML Map connector in the flow. For example, the following flow has an XML Map connector mapping X12 files to a database insert:

In this example, the X12 connector and the SQL Server connector should be used to generate the XML template files for the XMLMap connector in-between them. More details on generating a template file from an X12 connector or SQL Server connector can be found in the subsections above.