-
Notifications
You must be signed in to change notification settings - Fork 1
Inline Reader
Martin Danielsson edited this page Jul 15, 2015
·
1 revision
In some cases, e.g. for testing things, it may be useful to just hack in a list of IDs into the configuration file. This is what the "inline reader" is for:
<Source config="[field name]">inline://[value list]</Source>
The field name
gives the name of the single field (which is the only thing currently supported by the inline reader), whereas value list
gives a semicolon ;
separated list of explicit values. These values will be treated as a record each, and can be referenced using the Field Operator and the name given in field name
.
Example:
<Transformation>
<Source config="Id">inline://1;2;3;4;5</Source>
<Target config="delim=';'">file://C:\Temp\dummy.csv</Target>
<Mappings>
<Mapping>
<Fields>
<Field name="Id">$Id</Field>
<Field name="Text">"This is the record with key " + $Id</Field>
</Fields>
</Mapping>
</Mappings>
</Transformation>
This will output a CSV file at C:\Temp\dummy.csv
containing the following data:
Id;Text
1;This is the record with key 1
2;This is the record with key 2
3;This is the record with key 3
4;This is the record with key 4
5;This is the record with key 5