In this section: |
You are going to add two data targets and specify the options you want to use when loading data into them.
The newly created target will be updated by other flows.
To specify the first data target:
Right-click the dmrpts target object and select Properties. For this exercise, you will accept the default Load Type, which is Insert/Update.
Tip: If you intend to run a flow more than once, it is advisable to clear the target before starting the run. This technique generally enhances performance in subsequent runs. In the Prior to Load Option in the Target Properties window, select the clearing option that suits the adapter type being used for your data targets. For example, for a relational table the option is Truncate table; for a FOCUS/FDS or XFOCUS table the option is Drop table.
The next step is to map the data source columns you are extracting to the data target columns.
The five columns with identical names and data types are mapped and moved to the Expression tab. Note that the mapped columns are also checked in green in the Target Columns list.
Under Target Columns, double-click PROFIT to move it to the Target columns list in the Expressions tab.
The Transformation Calculator should look like this:
The Transformation window now looks like this:
Click the Validates tab in the Transformation window, then click the Insert Transforms button to open the Transformation Calculator.
Click the Test Transforms button in the upper right corner, above the Validates tab.
The result of the transformation test appears.
Note: The number of records retrieved will depend on the Run Options set from Tools and Options and the database you choose for your sample data.
In the Test1 column, the number 1 represents rows that will be accepted based on the validation test; the 0s represent rows that will be rejected because QUANTITY is less than 10.
Tip: You have been working in the Transformations window so testing from there is the simplest method, but you can also test the transformation by double-clicking the Target object and clicking the Test Transforms tab.
DataMigrator can load multiple data targets in a single data flow. Let's add another target object into the data flow. This time, the data target you need does not exist so you will create it using the columns in the SQL SELECT statement that you defined for the SQL Select Columns object.
This target table will be used by line managers for competitive analysis. You will create the base table here, but other flows can update it with additional information.
The Target Properties window opens.
The target properties window should look like this:
Next Step: You are ready to save the data flow. Both data targets, dmrpts and linerpts, will be loaded based on your specifications.
Click the Save button located above the workspace, or select File, and Save.
The Save Procedure As window opens. Select which application directory to save the flow to using the Save In drop-down menu, and enter a flow name in the Name field. For this example, we will save our flow in the salesdemo application directory and name the flow salesdb.
Next Step: You are ready to run the data flow.
iWay Software |