Search code examples
talendtalend-mdm

Talend shuffle the order of the columns


I was trying to achieve merging all the rows of a file into columns based on a certain sequence number. This has been achieved by tpivotToColumnDelimited.( this has to be done , cannot be changed ).

But after using that, the column ordering has been changed.

Is there any way of reading a file according to a schema and writing the file according to some other schema in talend ? ( Basically shuffling the column ordering in a file )

I had tried using setting tdynamicschema from input and output but was not able to read and write the data properly.

Any help would be highly appreciated.


Solution

  • I had solved the issue.

    Simply added a column which had the index number read from the file and before using the tpivotToColumnDelimited , i had used that column dynamically to sort the results and write to a tmp file and then with the help of tpivotToColumnDelimited , it is now according to the input schema.