XML configuration file to map column headings
You can import extension mapping documents whose column headings are different than the required headings by using a configuration file.
Purpose
Extension mapping documents can be created outside of IBM® InfoSphere® Information Server as comma-separated value (CSV) files.
If the extension mapping document does not have column headings or if they are not the required column headings, you can import the document into the catalog by using a configuration file in Extensible Markup Language (XML) format. During import, the configuration file defines which column in the extension mapping document corresponds to the correct column header.
Syntax
The following syntax governs how to redefine column headings in the extension mapping document.
<?xml version="1.0"?>
<config>
<header>true_or_false</header>
<columns>
<column index="column_num">Source Columns</column>
<column index="column_num">Target Columns</column>
<column index="column_num">Rule</column>
<column index="column_num">Specification Description</column>
<column index="column_num">Function</column>
<column index="column_num">Name of a custom attribute</column>
</columns>
</config>
- <header> </header>
- If the first row of the extension mapping document has column headings, the value must be true. As a result, the column headings are not imported into the catalog.
- <columns> </columns>
- The subelement <column index="column_num"> is the column number in the extension mapping document that corresponds to the correct column heading.
- Custom attribute columns
- The name of the custom attribute is the column heading. The custom attribute must exist in the catalog.
- Special characters and language support
- Commas
- A comma (,) is the only accepted delimiter.
- Quotation marks
- The use and treatment of quotation marks (") vary according to
the column.
Table 1. Use or treatment of quotation marks according to column Column Use or treatment of quotation marks - Source Columns
- Target Columns
Quotation marks are removed during import. - Rule
- Function
If quotation marks occur in the text, they must be enclosed within quotation marks (" " "). - Specification Description
Quotation marks are required around the entire text of the field if the text includes non-alphanumeric characters, such as mathematical symbols or commas. - Language support
- The CSV file must be in UTF-8 or in ANSI encoding to be compatible with all languages.
Example
In this example, a configuration file changes the column headings in the extension mapping document to be identical to the correct headings.
<?xml version="1.0"?>
<config>
<header>true</header>
<columns>
<column index="1">Source Columns</column>
<column index="3">Target Columns</column>
<column index="4">Rule</column>
<column index="8">Specification Description</column>
<column index="5">Function</column>
<column index="9">Credit Rating</column>
</columns>
</config>
This column in your extension mapping document file | Is mapped to this column in the configuration file | Comments |
---|---|---|
First | Source Columns | |
Second | The column is not imported. | |
Third | Target Columns | |
Fourth | Rule | |
Fifth | Function | |
Sixth | The column is not imported. | |
Seventh | The column is not imported. | |
Eight | Specification Description | |
Ninth | Credit Rating | Credit Rating is the name of a custom attribute that exists in the catalog. |