Salesforce

How Do I Use Conversion Tables? (Magic xpi 4.5)

« Go Back

Information

 
Created ByKnowledge Migration User
Approval Process StatusPublished
Objective
Description

How Do I Use Conversion Tables? (Magic xpi 4.5)

Use the Conversion Table and the Convert function to automatically utilize a lookup table when converting data from one vocabulary, or system, to another.

The conversion table can be used as a dynamic lookup table to facilitate automatic data conversion. There are two types of conversion tables:

Static Conversion Tables

The Static conversion table is based on a preconfigured flat file data. The conversion data is loaded at server startup. Refresh Conversion is only required if the data of the conversion table file was modified while the server was still running.

To use static conversion tables:

  1. In the Solution Explorer, double-click Data Converter, and define a static conversion table.

  2. Create a Data Mapper step.

  3. Define both the Source and Destination as flat files with several text fields.

  4. Map the fields from Source to Destination and use the Convert function where required. The Convert function returns a user string with converted data. It has four input parameters:

  1. Convert Table Name

  2. Input text (the field to be converted)

  3. Default value, which is used when the input field does not exist in the conversion table

  4. 0/1 case sensitivity indication

Dynamic Conversion Tables

In the example below, a dynamic conversion table is used to convert XML elements. The conversion data is stored in a database table, and is loaded into the conversion table at runtime. A dynamic conversion table is defined and loaded into memory using the Refresh Conversion Table service. The dynamic conversion table data is available only in the flow where it is defined, and is erased from memory when the flow terminates.

To use dynamic conversion tables:

  1. In the Flat File dialog box, accessed through the Flat File's Properties pane, define a dynamic conversion table as shown below.

  1. Create a Data Mapper step to prepare the conversion data.

  2. Define the Source as Database type. Define the Destination as Flat File type with two text fields.

  3. Map the input fields from the Source to the Destination. The second field in the Destination is the converted value. You can use an expression or additional lookup data to compile the converted value. The Destination file name is a dynamic expression, which is calculated at runtime.

  4. Use the Refresh Conversion Table service to refresh the data. The conversion table name is the name defined in the Data Converter Repository. The File Name is the Destination file defined in the preceding Data Mapper step. At this point, the conversion table data is loaded into the memory.

  5. Create a Data Mapper step to enable the conversion of the output.

  6. Define the Source and the Destination as XML files.

  7. Map the required values, as shown below. Use the Convert function that was described in the Static Conversion Tables section.

Reference
Attachment 
Attachment