Step 3. Define an SQL Where condition and input parameter
LIC007 - Extract Database to CSV File
This transformation map needs to support the selection of employees by department code to be inserted into the CSV text file. In this step you will complete the transformation map by adding an
, and an input parameter linking the file PSLMST to the output text file via the .1. Insert an
using the menu option.
2. Link the PSLMST file to the table element of the
, this will open the properties dialog:
3. Define the selection as DEPTMENT = :Department_In (note the colon - and lack of space - before Department_In). This will define an input parameter – see example below.
Note: DEPTMENT is the name of the department code field in the file PSLMST, which the transformation is reading.
4. Click the
button to save these changes. Your map window should now look like the following:
5. Using the
menu option to define an Input parameter.
6. Define a string input called Department_In and click
.Note: You can also define a default value and use this in to produce sample output.
7. Link the
function to the Condition and link the output to the text file , as shown below.
8. Use the
icon to save your transformation map. Note that the messages area at the bottom left of Mapforce should look like the following:
9. Select Note: this view has been scrolled to the right, to show the Department Description column which has been retrieved from the related table DEPTAB.
tab. Provided you specified a default value in the Input parameter, this will show the employees which will be selected.
10.Close
.