You can use an in-out parameter as a placeholder for a source query. To use an in-out parameter as a source query, create a string parameter, define a default query value, and enter the parameter in the query dialog of the Source transformation properties.
When you use an in-out parameter as a source query, you must provide a valid query for the default parameter value.
Data Integration
uses the default query to generate design time source metadata.
Data Integration
uses this metadata to map fields to the fields in the query that you use at run time. If
Data Integration
can't generate the design time metadata, the task fails.
You can create the in-out parameter before or after you configure the Source transformation. However, if you configure the Source transformation before you define the default parameter value, you must synchronize the source fields on the
Fields
tab before you run the task.
In the Mapping Designer, create an in-out parameter and enter a default query.
Configure the Source transformation.
Select
Query
as the source type and enter the in-out parameter in the
Query
dialog using the following format:
$$<parameter name>
In the mapping task, perform one of the following actions:
On the
Source
tab, enter the query that you want to use at run time.