In the following procedure, you save and validate the mapping and then you test run the mapping.
You can save a mapping that is not valid. However, you cannot run a task that uses a mapping that is not valid. An example of an invalid mapping is a Source transformation or Target transformation that does not have a specified connection, or a mapping that does not have a Source transformation and a Target transformation.
To validate the mapping, click
Save
.
Whenever you save the mapping, the Mapping Designer validates the mapping. The status of the mapping displays in the header next to the mapping name. The mapping status can be Valid or Invalid.
If the mapping is not valid, perform the following steps:
In the header, click the
Validation
icon to open the
Validation
panel.
The
Validation
panel lists the mapping and the transformations used in the mapping and shows where the errors occur. For example, in the following image, the tgt_Accounts_by_State Target transformation has an error:
After you correct the errors, save the mapping and then in the
Validation
panel, click
Refresh
. The
Validation
panel updates to list any errors that might still be present.
To test the mapping, click
Run
.
In the wizard, select the runtime environment and click
Next
.
The
Targets
page appears. The
Targets
page appears because the target is parameterized. If you create a mapping that does not include a parameterized target, you will not see the
Targets
page when you run the mapping.
The parameter you created for the target object displays on the page with the Accounts for State label, as you specified when you created the parameter.
You can select a target object or create a new target object. For this tutorial, let's create a new target object that will include accounts for Texas.
On the
Targets
page, click
Create Target
.
Enter the object name
Accounts_By_State_TX
and click
OK
.
Click
Next
.
The
Input Parameters
page appears. In the
Filter Value for State
text box, note that the default value you entered for the filter condition,
MD
, displays in the text box.
Change the value from
MD
to
TX
so that the target file will include the accounts from Texas.
Click
Run
.
The
mapping
task runs and then returns you to the Mapping Designer.
In the navigation bar, click
My Jobs
. The
My Jobs
page lists all of the jobs that you have run. At the top, you should see the
mapping
task that was created when you ran the mapping, as shown in the following diagram:
The
My Jobs
page shows that there were three accounts from Texas, which are now in your tgt_Accounts_By_State_TX target file.