Previous Topic: Extract Data Using Annotations (Flatfile)Next Topic: Asset Mapping Structure


Configure the Mapping File

You can configure the datasource, connection properties, and processing information for a mapping file by entering the following information. This mapping file structure is common across the datasource types used by the CA Asset Converter. Only the mapping expressions and connection properties change from one datasource type to another.

Note: All XML files you create, and the sample XML code used in this guide must be well-formed and comply with XML and XSD standards.

<datasource>

Specify the datasource for the mapping file. For example, DataBase or database.

<processing-info>

(Optional) Specify the following tags for processing purpose only. The tags will not be part of the asset XML file.

max-assets-to-process

Limit to retrieve assets less than or equal to the value specified by this tag. Use this tag and enter a value when creating the mapping file to verify whether a mapping file generates the correct asset XML file. For example, max-assets-to-process to 1, 2, 3, and so on. If you do not use this tag, the CA Asset Converter generates all assets in the datasource.

encoding-type

(Flatfiles only) Type of encoding of the input files. FlatFile supports only UTF-8 , ANSI, and UNICODE formats. If you do not specify an encoding type in the input configuration file, the CA Asset Converter uses the UTF-8 format.

<output-settings>

If you do not specify the output settings, the default values are used. You can use the following tags:

dest-dir

Path of the directory where the output XML files are stored. If the directory does not exist, it is automatically created. The default destination directory is AssetConverterAssets in the installation directory.

output-filename

Name of the final asset XML files. For example, <output-filename value="asset"/>. In this example, the generated files are named asset0.xml, asset1.xml, and so on. You can also use the hostname as the generated asset file name. For example, <output-filename host-name="true"/>. If the host-name attribute in the output-filename tag is true, the hostname is the file name, because the hostname is unique. If it is not unique, the previous file with the same hostname is overwritten.

  • If the host-name attribute is false, the attribute value is the filename and is appended by a unique number.
  • If the host-name attribute is false and the value attribute is either empty, the default filename is asset and is appended by a unique number.
<ftp-details>

(Flatfiles only) If the source file is located on a File Transfer Protocol (FTP) site, specify the following FTP details:

is-ftp-site

Indicates if the source file is located on an FTP site. Set to true.

ftp-url

The location of the FTP site.

ftp-port

The port number used for FTP access.

ftp-username

The user name to log in to the FTP site.

ftp-password

The password to log in to the FTP site.

CA MDB

Define the connection properties for a mapping file to connect to the MDB.

Example: Configuration Section of a Typical Mapping File

The following sample XML code illustrates the configuration section of a typical mapping file.

<?xml version="1.0" encoding="UTF-8"?>
<asset-converter>
<datasource type=""> (a valid datasource type: DataBase OR FlatFile)
</datasource>
<processing-info>
<max-assets-to-process value="10"/> 
</processing-info>
<output-settings>
<dest-dir value="Relative/Absolute paths"/>
<output-filename value="asset" host-name="false"/> 
</output-settings>
CA MDB
<mdb-type>10<mdb-type>
<mdb-connection-properties>
<mdb-property name="server">servername</mdb-property>
<mdb-property name="database">databasename</mdb-property>
<mdb-property name="username">username</mdb-property>
<mdb-property name="port">portnumber</mdb-property>
<mdb-property name="password">password</mdb-property>
</mdb-connection-properties>
</mdb>
<asset-converter>