Lookup Analytics
The Lookup analytics plugin is available in the Hub.
The Lookup analytics performs a lookup of a given field within a lookup dataset by matching it with input dataset and includes the field, and its value in resulting dataset. The difference from joiner plugin is that this plugin returns all the fields from input dataset and only the lookup field from the lookup dataset. Lookup dataset will be set as broadcast.
Use this plugin when you need to lookup a reference data set for finding a specific value or multiple values for input data to complete the information before it is loaded into the data mart or data warehouse. This will help to provide complete information that needs to be loaded into the data mart.
Configuration
Property | Macro Enabled? | Description |
---|---|---|
Lookup dataset | Yes | Required. Amongst the inputs connected to the Lookup, this determines the input that should be used as the lookup dataset. Lookup dataset will be set as broadcast. |
Input key field | Yes | Required. Field in the input schema that should be used as a key in the lookup condition. |
Lookup key field | Yes | Required. Field in the lookup source that should be used as a key in the lookup condition. |
Lookup value field | Yes | Required. Field in the lookup source that should be returned after the lookup. |
Output field | Yes | Optional. Name of the field in which to store the result of the lookup. This field will be added to the output schema, and will contain the value of the Lookup Value Field. |
Example
In case we have two datasets: customers and phone_numbers. In the Lookup analytics plugin, we can set phone_numbers as lookup dataset which leaves customers as the input dataset.
customers |
|
|
---|---|---|
customer_id | first_name | last_name |
1 | John | Doe |
2 | Jane | Doe |
phone_numbers |
|
|
---|---|---|
id | customer_id | phone_number |
1 | 1 | 555-555-555 |
Set input key field as customer_id
Set lookup key field as customer_id
Set lookup value field as phone_number
Set output field as phone
The output record will have the lookup value field, which in our case is phone_number aliased as phone:
customers |
|
|
|
---|---|---|---|
id | first_name | last_name | phone |
1 | John | Doe | 555-555-555 |
2 | Jane | Doe |
|
Created in 2020 by Google Inc.