Obtaining the surrogate key for a time dimension

In the case of a time dimension, if the key is the date in numeric format, the method to get the surrogate key is simply changing the metadata for the date, in the same way we did when loading the dimension: from date to string first, and then from string to number.

If, instead of the date you have a regular surrogate key, you can use a Database lookup step to get the surrogate key.

The following table summarizes the different possibilities to get surrogate keys:

Dimension type

Method to get the surrogate key

Sample dimension

Type I SCD

Database lookup step.

REGIONS

Type II SCD

Dimension L/U step.

PUZZLES

Junk and Mini

Combination L/U step if you load the dimension ...

Get Learning Pentaho Data Integration 8 CE - Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.