Importing Data from an XML File
You can import data directly from XML files, specifying the data sheets. You can do it by either:
Dragging the XML file directly onto the Stage, creating an Import from XML File task.
Dragging an Import from XML File task onto the stage: this operation allows you to perform a more precise import operation, as you can:
Import a single file: only one file is imported, specifying the datasheet from which information will be taken.
Import multiple files together: in this case the files are concatenated to form a single table. This means that all files imported together must have the same structure.
A preview of the imported table is always displayed in the task.
Prerequisites
You must have created a flow;
In case you are importing multiple files, they need to have the same structure.
Procedure
Drag an Import from XML File task onto the stage.
Double click the task and open the task menu.
Choose from the drop-down list if you want to import the file from your computer (Local) or from a remote connection.
If you are importing from a Remote Filesystem, choose it from the list and then click on the pencil button to set the connection information required (only if you are using a Custom source). The tables are loaded in the Files tab.
If you are using a Local Filesystem, drag the Excel files onto the file area or click on the Select File button and choose the path.
Drag the XML file onto the file area or click the Select button and choose the path.
If you are importing more files together, click on the Concatenation Type’s drop-down arrow to choose Inner or Outer concatenation.
Inner concatenation final table includes only attributes that exist in both tables.
Outer concatenation final table includes all the attributes, filling in any missing values if necessary.
If you are importing more files together, click on the Match Column by drop-down arrow and choose if you want to match them by their Name or by their Position.
Click on the XML options tab and set the Parsing options and Import options, as shown in the table below.
Save and compute the task.
Parsing and Import options
Settings option | Description |
---|---|
Parsing options | Here you can set:
|
Import options |
|