Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Discover how organizations are unlocking new revenue streams: Watch here
cancel
Showing results for 
Search instead for 
Did you mean: 
anitha_manohar
Contributor
Contributor

Handling Dynamic Column in Talend

Hi,
Can we handle variable csv file in talend.
My input csv file will have 2 fixed columns and upto 10 variable columns.
eg: 
file1:name;account;val1;val2
file2: name,account,val1,val3,val5
file3: name,account,val2,val5,val1
I need to update the database with these values and default values for the missing columns.
Labels (3)
5 Replies
Anonymous
Not applicable

Hi,
Could you please take a look at document about: TalendHelpCenter:How to process changing data structure? to see if it is what you are looking for?
Best regards
Sabrina
_AnonymousUser
Specialist III
Specialist III

Hi,
The document has example to read dynamic columns and load new table.
But my requirement is to update an existing table.
Is it possible to update an existing table.
Anonymous
Not applicable

Hi,
What's your  existing table column structure? Fixed columns? Name and account?

Best regards
Sabrina
_AnonymousUser
Specialist III
Specialist III

Hi,
My existing column Structure is 
name,account,val1,val2,val3,val4,.....,val10
But in the input files I may not receive values for all the "Val*" fields. and no of columns in the files is also variable.
sample input file : name,account,val3,val5,val6
I need to identify the field name in the input file and update appropriate column in my table for that name and account.
I tried to read the header and values separately using the dynamic data type , but how do I do a lookup on the header field and map it to the appropriate column in the database table.
input file is  a delimited file
name,account,val3,val5,val6
abc,12345,1,2,1
o/p Table:
name,account,val1,val2,val3,val4,val5,val6,val7,val8,val9,val10
abc,12345,0,0,1,0,2,1,0,0,0,0
Anonymous
Not applicable

Hi,
Please take a look at this forum:  https://community.talend.com/t5/Design-and-Development/resolved-Generic-Talend-Job/td-p/92354 to see if it is OK with you.
Best regards
Sabrina