Range lookups

You can define a range lookup.

You can define a range lookup on the stream link or a reference link of a Lookup stage. On the stream link, the lookup compares the value of a source column to a range of values between two lookup columns. On the reference link, the lookup compares the value of a lookup column to a range of values between two source columns. Multiple ranges are supported.

  1. Select the column for the lookup:
    • To define the lookup on the stream link, select the Range check box next to the source column in the links area.
    • To define the lookup on a reference link, select the Key check box next to the reference column in the meta data area. In the links area, select Range from the Key Type list. The data on the reference link must be sorted. (Tip: See if the APT_NO_SORT_INSERTION environment variable is used and set to true for the reference link. If the APT_NO_SORT_INSERTION environment variable is set to true, then you must specify a Sort stage on the reference link to ensure that the data is sorted.)
  2. Double-click the Key Expression field next to the selected column to open the Range dialog box.
  3. Select a link from the Lookup Link list. (If you are defining the lookup on a reference link, the stream link appears by default.)
  4. Define the range expression by selecting the upper bound and lower bound range columns and the required operators. For example:
    Account_Detail.Trans_Date >= Customer_Detail.Start_Date AND
    Account_Detail.Trans_Date <= Customer_Detail.End_Date

    As you build the expression, it appears in the Expression box.

  5. Select Caseless if you want the lookup to ignore case.
  6. Click OK.