Parameters
Passing parameters ..
Last updated
Passing parameters ..
Last updated
If you need to create a dataset with data coming from a database, you can do it just by using a Table Input step.
If the SELECT statement that retrieves the data doesn't need parameters, you simply write it in the Table Input setting window and proceed.
However, most of the times you need flexible queries—queries that receive parameters.
This demonstration will show you how to pass parameters to a SELECT statement in PDI.
Assume that you need to list all products in Steel Wheels for a given product line and scale.
As we're passing the parameters in a single row, we have to careful and ensure the datastream fields are mapped in the correct order according to the WHERE clause.
Open the Data grid step: Parameters (1 row).
Open the Table input step - Steel Wheels Products 1.
The replacement of the markers respects the order of the incoming fields.
Any values that are used in this manner are consumed by the Table Input step. Finally, it's important to note that question marks can only be used to parameterize value expressions just as you did in the recipe.
Keywords or identifiers (for example; table names) cannot be parameterized with the question marks method.