The Combination Lookup-Update step allows you to store information in a junk-dimension table, and can possibly also be used to maintain Kimball pure Type 1 dimensions.
This step will...
This step creates/maintains a technical key out of data with business keys. After passing through this step all of the remaining data changes for the dimension table can be made as updates, as either a row for the business key already existed or was created.
This step will maintain the key information only. You must update the non-key information in the dimension table, e.g. by putting an update step (based on technical key) after the combination update/lookup step.
Pentaho Data Integration will store the information in a table where the primary key is the combination of the business key fields in the table. Because this process can be slow if you have a large number of fields, a "hash code" field is supported that is representing all fields in the dimension. This can speed up lookup performance dramatically while limiting the fields to index to one field only.
Example Transformations (zip file)
Option |
Description |
---|---|
Step name |
Name of the step.
|
Connection |
Name of the database connection on which the dimension table resides. |
Target schema |
This allows you to specify a schema name. |
Target table |
Name of the dimension table. |
Commit size |
Define the commit size, e.g. setting this to 10 will generate a commit every 10 inserts or updates. |
Cache size in rows |
This is the cache size in number of rows that will be held in memory to speed up lookups by reducing the number of round trips to the database. A cache size of 0 caches as many rows as possible and until your JVM runs out of memory. Use this option wisely with dimensions that can't grown too large. A cache size of -1 means that caching is disabled. |
Key fields |
Specify the names of the keys in the stream and in the dimension table. This will enable the step to do the lookup. |
Technical key field |
This indicates the primary key of the dimension. It is also referred to as Surrogate Key. |
Creation of technical key |
Specify howthe technical key is generated, options which are not available for your connection will be grayed out:
|
Remove lookup fields? |
Enable this option if you want to remove all the lookup fields from the input stream in the output. The only extra field added is then the technical key. |
Use hashcode |
This option allows you to generate a hash code, representing all values in the key fields in a numerical form (a signed 64 bit integer). This hash code has to be stored in the table.
|
Date of last update field |
When required, specify the date of last update field (timestamp) from the source system to be copied to the data warehouse. For example, when you have an address without a primary key. The field will not be part of the lookup fields (nor be part in the hash code calculation). The value is written once only because any change results in a new record being written. |
Get Fields button |
Fills in all the available fields on the input stream, except for the keys you specified. |
SQL button |
Generates the SQL to build the dimension and allows you to execute this SQL. |
All fields of this step support metadata injection. You can use this step with ETL Metadata Injection to pass metadata to your transformation at runtime.