Lookup is located under Model Studio ( ) in Data Preparation, in the left task pane. Use the drag-and-drop method to use the feature in the canvas. Click the feature to view and select different properties for analysis.
Refer to Properties of Lookup.
The available properties of the Lookup are as shown in the figure given below.
The table given below describes the different fields present on the properties of the Lookup.
Field | Description | Remark | |
Run | It allows you to run the node. | - | |
Explore | It allows you to explore the successfully executed node. | - | |
Vertical Ellipses | The available options are
| - | |
Task Name | It is the name of the task selected on the workbook canvas. | You can click the text field to edit or modify the name of the task as required. | |
Lookup Connection | It allows you to select the dataset to compare with the predecessor of Lookup. |
| |
Cache Size | It is set to 0 by default. | — | |
Lookup Condition | It allows you to add the condition to compare the values. | Refer to Adding Lookup Condition. | |
Lookup Features to Return | It allows you to select the features that are the columns of the data set selected in Lookup Connection. These features are added to the result of Lookup. |
| |
If non matching records found? | It allows you to select the action to be taken if non-matching records are found. | The available options are –
| |
Advanced | Node Configuration | It allows you to select the instance of the AWS server to provide control on the execution of a task in a workbook or workflow. | For more details, refer to Worker Node Configuration. |
To add a lookup condition, follow the steps given below.
From the Condition drop-down, select the comparison operator.
Note: | The available operators are <, <=, <>, =, >, and >=. |
From the Order By drop-down, select the ordering option – Ascending or Descending. This step is optional. The default value is Ascending.
The complete dataset selected for the lookup feature is ordered accordingly.
Note: | To add more conditions, repeat steps 2 to 7. If more than one query is added, they are joined using the logical AND operator. |
The specified conditions are added. If you have more than one condition, they are joined using the logical AND operator.
The Lookup dataset - Customer Billing with CustID and Billing Date columns is shown in the figure below.
To lookup for customer id in the Billing Dataset, the Lookup properties are selected as below.
Property | Value |
Lookup Connection | Customer Billing (A dataset containing CustID and BillingDate as shown in Figure 5) |
Lookup Condition | CustID = IP Customer ID |
Lookup Features to Return | CustID |
If non matching records found? | Capture Non Matching Records |
The result of the Lookup for Capture Non Matching Records is displayed in the figure below.
As seen in the above figure, the non-matching records are captured, and their Lookup_Flag value is 0.
If the property If non matching records found? is set to Do Not Pass, the result is displayed as shown in the figure below.
As seen in the above figure, the non-matching records (2, 5, and 7) are not passed to the output.
If the property If non matching records found? is set to Fail Task, the Lookup task fails as the datasets contain non-matching records. The Lookup task fails, as shown in the below figure.
The Trace Log displays an error, as shown in the figure below.