Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi I am new to Talend. I have a CSV file as source and Postgres table for target. The column order and the column names are different in CSV and Postgres.
How do I load the data using TMAP?
Hi,
The column order is not a factor since you are using tMap. You define the source order in the left part of the tMap and create target order in the right side of tMap.
Once you create the right order in both sides, its just drag and drop to the columns. Balance part Talend will take care 🙂
Warm Regards,
Nikhil Thampi
Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
Hi,
The column order is not a factor since you are using tMap. You define the source order in the left part of the tMap and create target order in the right side of tMap.
Once you create the right order in both sides, its just drag and drop to the columns. Balance part Talend will take care 🙂
Warm Regards,
Nikhil Thampi
Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
Hi,
actually, there is no need to order the field: if the column names in the output row of the tMap have the same names that the PostgreSQL table, it won't matter (and if they don't, it will fail even if the order is correct).
Just read your input file (here the order is important), add your tMap with all the columns of your output table correctly named and map every input row to the corresponding output row and voilà!
Regards.
@A_San Just to let you know : column names are different isn't a problem
Import your csv input file , connect to tmap, and the target postgres file.
Map the source columns to the concern target column based on your requirement. Migrate the data.
Thanks,
Prabuj