You are not logged in.

Unanswered posts



Important! This site has been replaced. All content here is read-only. Please visit our brand-new community at https://community.talend.com/. We look forward to hearing from you there!



#1 2016-07-01 10:46:15

mounica_ch
Member
10 posts

mounica_ch said:

Appending a column to a single row in an existing CSV

Hi all
I have two CSV files 
1st file columns:
Serial NO,Error Message
2nd file columns:
Serial No
Now we have to compare these two serial numbers if matches we have to append the error message from first file to second file for that particular serial Number.


mini_error.png_20160701-0357.png



This is the first CSV file
#20=123 In this 123 is my serial No.We have to extract 123 from the string



mini_csv2.png_20160701-0248.png

This is the second CSV file 
Now if the Serial Numbers Matched then the Error message from First CSV should be copied to second CSV under a new column for that serial number.


Can anyone please help.

Thanks

Last edited by mounica_ch (2016-07-01 11:59:14)

Offline

#2 2016-07-01 11:11:43

tal00000
Member
522 posts

tal00000 said:

Re: Appending a column to a single row in an existing CSV

It sounds like your second file is you main flow and you first file (with error message) is a look-up, so you should be able to outer-join these using tMap.

You can then add the serial number from the main flow to the output, along with the error message from the lookup.

With your outer join, you can specify if you want to match all records, just the first, or just the last, depending on the uniqueness of your serial numbers.


TalendByExample.com   TalendFramework.com
A site about Talend        A Talend Framework

Offline

#3 2016-07-01 12:01:44

mounica_ch
Member
10 posts

mounica_ch said:

Re: Appending a column to a single row in an existing CSV

But my lookUp file is as follows



mini_error.png_20160701-0403.png
the right side value of #20 is my serial No which needs to be compared with the serial No in the second file.

Last edited by mounica_ch (2016-07-01 12:03:28)

Offline

Board footer

Talend Contributor Agreement - Talend Website Privacy Policy