SQL Lookup
Looks up records in a table
Processing
For every input row the step looks up records in the database table matching the given values in key fields.
The lookup rows from the table are available as step results.
Settings
Name | Type | Description |
---|---|---|
Connection |
dict |
The database connection to use. Evaluated for each input row |
Schema |
string |
The database schema of the table. Evaluated for each input row |
Table |
string |
Name of the dimension table in the database. Evaluated for each input row |
Fields | ||
Keys |
Key fields of table and corresponding values used to look up records. Evaluated for each input row |
|
Data fields |
The fields retrieved from looked up records. Evaluated for each input row |
|
Cache | ||
Use Cache |
boolean |
If Evaluated once when step initializes |
Cache Size |
long |
Number of records cached
Evaluated once when step initializes |
Pre-load Cache |
boolean |
If Evaluated once when step initializes |
Pre-load SQL Filter |
string |
If non-empty, this query text is appended as an AND condition to the cache pre-loading query. It should contain a predicate to append to the where clause of the query, for example: This is useful to selectively pre-warm the cache with a specific subset of records. Evaluated once when step initializes |
Pre-load SQL Parameters |
list |
If the pre-load cache filter contains Evaluated once when step initializes |
Bloom Filter | ||
Use Bloom Filter |
boolean |
If During processing, the bloom filter is then used to determine whether any records with given keys are present in the table. The filter is only useful when a substantial portion of the looked up records are not actually present in the table. It allows to skip the lookup query in such cases. Evaluated once when step initializes |
Bloom Filter Size |
long |
The expected number of distinct keys the bloom filter should be able to handle. This number is used to ensure the bloom filter operates with an expected false positive rate of 5%. That is 5% of the time the filter might indicate that a set of keys might be present in the table, when in fact it is not. This number should be close to the number of distinct keys in the fully loaded table. Evaluated once when step initializes |
Results
Name | Type | Description |
---|---|---|
lookup |
dict | The first record returned by the database lookup |
lookup_rows |
list | Complete list of records returned by the database lookup |