I am reading data from a survey in a table that has 3 fields: - record - question - answer
in each row for every record there are many questions with the relative answer:
|record|question|answer|
------------------------
|1 |q1. |a1. |
|1 |q2. |a2. |
|2 |q1. |a1. |
|2 |q2. |a2. |
What i want to do in Pentaho is transform this table to one where i have the record field and then each question should be a field so that rows contain record id and answer values:
|record|q1 |q2. |
------------------------
|1 |a1 |a2 |
|2 |a1 |a2 |
I would do it with the de-normalization step, but in my case i have a lot and possibly changing questions, so i was wondering if there is an automatic way to have the values in the input question field mapped to the output field names.
You can try with Metadata injection to inject these values in runtime!!!