User Guide : Designing and Executing Map : Managing Constants : Example
 
Share this page                  
Example
The following is the example for using constants with ASCII (Delimited) as source connector and Excel 2000 as target connector.
1. To connect to source:
a. Go to Sources tab > Source Connection section and select ASCII (Delimited) as the source connector.
b. In Source File/URL, specify the source file.
c. In ASCII (Delimited) Properties, set Header as True.
d. Click Connect to establish the connection.
2. To connect to target:
a. Go to Targets tab > Target Connection section and select Excel 2000 as the target connector.
b. In Target File/URL, specify the target file
c. From Sheet, select Sheet1
d. From the Select Output drop-down list, select Replace.
e. Click Connect to establish the connection.
3. On the Mapping tab, add constants:
a. Select Constants from the drop-down filter on the right corner of the source grid.
b. Add a constant.
c. Specify Type as String and Value as “43”.
4. Go to Advance View > Target Tree view and add record R1 and the fields.
5. Map the constants from the source side.
6. In Source tree, click Events, add the event as EventStarted event and action as OutputRecordSet.
7. Save and run the map.
The mapped field mus display the constant value as 43.