In the following procedure, you create a parameter for the target object so that each time you run the mapping task, you can select a different target.
For example, you might want tables that only include data for the countries you specify in the filter parameter when you run the mapping task. When you run the task, if you filter for customers in France, you can select the table that contains data for France customers as the target.
1On the mapping canvas, click the Target transformation to select it.
2To name the Target transformation, in the Properties panel, click General and enter tgt_CustomersByCountry as the Target transformation name.
3Click Target and configure the following properties:
Target detail
Description
Connection
Select the target connection you created for this tutorial. In this example, we'll use a Google BigQuery target.
Target Type
Target object or parameter.
You want to parameterize the target object so that you can have separate tables for each country, so select Parameter.
Parameter
Parameter to use for the target object. This field only appears when you select Parameter as the target type.
Click New Parameter, and for the parameter name, enter p_CountryTargetParameter. For the display label, enter Customers for Country. Then, click OK.
The following image shows the properties for the Target transformation:
4Click Field Mapping and for Field map options, select Automatic.
You can't configure field mappings because the target object is parameterized. The fields in the target objects might not be the same each time you run the task.