I have a CSV file with four fields:
FIELD_A, FIELD_B, FIELD_C, FIELD_D
1, 2, 3, 4
5, 6, 7, 8
I also created a transformation in PDI that has a Read CSV Input file step and a following step that inserts the values in a database table.
This works fine, however I may get other combinations in the input file (without notice), such as:
FIELD_A, FIELD_B, FIELD_D
1, 2, 4
5, 6, 8
I was assuming that PDI was going to be intelligent enough to map the fields by name, and send to the next step FIELD_A, FIELD_B, and so on, depending on the position of the column header. Instead, it takes the first three fields in the file and maps them to the first three fields in the step. As a result, I get in FIELD_C the values of FIELD_D.
Is there a way to have the transformation map by field name instead of position? I cannot change the transformation every time an input field is received.