Search code examples
normalizationetlentity-attribute-valuepentaho-spoon

How to transform to Entity Attribute Value (EAV) using Spoon Normalise


I am trying to use Spoon (Pentaho Data Integration) to change data that is in typical row format to Entity Attribute Value format.

My source data is as follows:

enter image description here

My Normaliser is setup as follows:

enter image description here

And here are the results:

enter image description here

Why is the value for the CONDITION_START_DATE and CONDITION_STOP_DATE in the string_value column instead of the date_value column?

According to this documentation

  • Fieldname: Name of the fields to normalize
  • Type: Give a string to classify the field.
  • New field: You can give one or more fields where the new value should transferred to.

Solution

  • Please check Normalizing multiple rows in a single step section in http://wiki.pentaho.com/display/EAI/Row+Normaliser. Accordind to this, you should have a group of fields with the same Type (pr_sl -> Product1, pr1_nr -> Product1), only in this case you can get multiple fields in output (pr_sl -> Product Sales, pr1_nr -> Product Number).

    In your case you can convert dates to strings and then use row normalizer with single new field and then use formula for example:

    enter image description here

    And then convert date_value to date.