Description
The De-normalizer step allows you de-normalize data by looking up key-value pairs. It also allows you to immediately convert data types.
Options
| Option | Description |
|---|---|
| Step name | Name of the step; this name has to be unique in a single transformation. |
| Key field | The field that defined the key. |
| Group fields | Specify the fields that make up the grouping here. |
| Target fields | Select the fields to de-normalize by specifying the String value for the key field (see above). Options are provided to convert data types. Strings are most common as key-value pairs so you must often convert to Integer, Number or Date. If you get key-value pair collisions (key is not unique for the group specified) specify the aggregation method to use. |
Thank you Jakub, your example helped me to find the way for my solution.
The simple example available in PDI 3.2 is really great. (/.../pdi/samples/)
My explanation may help someones:
- target fieldname is the names of the fields you want to create
- value fieldname is the name of the field you want to take the information from (values in the columns you create)
- key value is the value for which this have to match.
In other words :
- if [value fieldname] == [key value]
- then [target fieldname] for this line = [value fieldname]
- end
Think that the key field is the name of the column you want to take to several columns
You have to define each column you want to create
Here are all the answers to the questions I had ;-)
See a more detailed description with examples written by Matt in 2006.
The point is that in the source database we have a table that stores a variable set of custom attributes for an entity like this:
Here, clearly, we can add any number of custom attributes to our customers using key (CustomAttributeName) - value (CustomAttributeValue) pairs. However in the data warehouse we would like to turn those into columns of their own:
The Row denormalizer stpe can does exactly this. It's attributes would be: