0 / 0
Lookup stage in DataStage: fast path

Lookup stage: fast path

This section specifies the minimum steps to take to get a Lookup stage functioning.

IBM DataStage has many defaults which means that lookups can be simple to set up.

The exact steps you need to take when setting up a Lookup stage depend on what type of lookup table you are looking up.

If you are using a lookup table read into memory from some other stage, you need to specify the details required in the Data Input source stage, the stage providing the lookup table, and the Lookup stage.

If you are accessing a lookup table read into memory from some other stage, you need to do the following:

In the Data Input source stage:

  • Specify details about the data source (for example, if using a File Set stage, give the name of the File Set).
  • Verify that the required column metadata has been specified.
  • Fulfill any "must do's" for that particular stage editor.

In the stage providing the lookup table:

  • Verify that the required column metadata has been specified.
  • Fulfill any "must do's" for that particular stage editor.

In the Lookup stage:

  • Map the required columns from your data input link to the output link.
  • Map the required columns from your lookup table or tables to the output link.
  • Specify the key column or columns which are used for the lookup. Do this by dragging - or copying and pasting - key columns from the data link to the Key Expression field in the lookup table link. Note that key expressions can only be specified on key fields (that is, columns that have the key field selected in the column definitions). If you drag a column that is not currently defined as a key, you are asked if you want to make it one. If you want the comparison performed on this column to ignore case, then select the Caseless check box.

If you want to impose conditions on your lookup, or want to use a reject link, you need to edit the Conditions. From here you can:

  • Specify that one of the reference links is allowed to return multiple rows when performing a lookup without causing an error (choose the relevant reference link from the Multiple rows returned from link list).
  • Specify a condition for the required references. Open the expression editor. This expression can access all the columns of the primary link, plus columns in reference links that are processed before this link.
  • Specify what happens if the condition is not met on each link.
  • Specify what happens if a lookup fails on each link.

If you want to specify a range lookup, select the Range from the Key Type list on the reference link. Then open the Range properties, where you can build the range expression.

Next you need to open the Stage and expand the properties section. From there you can see the link properties.

  • On the Stage tab go to the Link Ordering section and verify that your links are correctly identified as "primary" and "lookup(s)", and reorder if required.
Generative AI search and answer
These answers are generated by a large language model in watsonx.ai based on content from the product documentation. Learn more