Exportizer Users' Guide vlsoftware.net

Field Mappings File

Contents Index Previous Next

Field mappings files contain source-to-target field mappings. Use them whenever you need the same field mappings to be used more than once.

The field mappings file must be a plain text file containing one line per mapping. Lines with a semicolon at the beginning are ignored as comments. Blank lines are allowed. Such files can have any extension.

Each mapping must hold a pair of source and target field names separated by equal sign (standard syntax), for example:

TotSum=Total_Sum

or a pair of source and target field attributes written in pseudo HTML format and separated by equal sign (extended syntax), for example:

<name>TotSum</name><type>Float</type>=<name>Total_Sum</name><type>Float</type><size>16</size><precision>2</precision>

Notes
1. To avoid incorrect interpretation of the mappings, it is recommended that field names not contain equal signs.
2. Combing standard syntax and extended syntax in one file should be avoided.
3. Instead of source field name, dynamic expression can be used (see examples below).

Example of the field mappings file in standard syntax:

;Source-to-Target mappings for Payments aggregation
ActualityDate=ACTUALITY_DATE
PaymentCount=PAYMENT_COUNT
PaymentSum=PAYMENT_SUM
vle_expr(0.1 * dataset_field_val(1, 'PaymentSum'))=COMMISSION_SUM

Example of the field mappings file in extended syntax:

;Source-to-Target mappings for Payments aggregation
<name>ActualityDate</name><type>Date</type>=<name>ACTUALITY_DATE</name><type>Date</type><size>16</size><precision>2</precision>
<name>PaymentCount</name><type>Integer</type>=<name>PAYMENT_COUNT</name><type>Integer</type><size>5</size><precision>0</precision>
<name>PaymentSum</name><type>Float</type>=<name>PAYMENT_SUM</name><type>Float</type><size>16</size><precision>2</precision>
<name>vle_expr(0.1 * dataset_field_val(1, 'PaymentSum'))</name><type>Float</type>=<name>COMMISSION_SUM</name><type>Float</type><size>16</size><precision>2</precision>