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: 
Anonymous
Not applicable

Special Character in Dynamic CSV column name

Hello,
I have a csv file with dynamic column sequence just like the one in https://community.talend.com/t5/Design-and-Development/Dynamic-column-name-in-CSV/td-p/106686
I've tried to implement the solution in one of my csv file and it works like a charm.
However I got error when the column name in the csv file contains special characters such as % and _
for example I have csv files like this
field A,field A %
value11,value12
value21,value22
I use the wizard to guess the schema and they are listed as field_A and field_A__
I use tJavaRow to put the first line of the cvs into globalMap as "HEADER_ROW"
after that I use another tJavaRow to populate appropriate outputrow based on dynamic csv file used
however i got this error
Exception grabbing field value: field_A_
Exception in component tJavaRow_2
java.lang.RuntimeException: java.lang.NoSuchFieldException: field_A_
at routines.PopulateFromDynamic.populate(PopulateFromDynamic.java:96)
at test.infotrak_0_1.infotrak.tFileInputDelimited_2Process(infotrak.java:13460)
at test.infotrak_0_1.infotrak.tFileInputDelimited_1Process(infotrak.java:4824)
at test.infotrak_0_1.infotrak.runJobInTOS(infotrak.java:14769)
at test.infotrak_0_1.infotrak.main(infotrak.java:14637)
Caused by: java.lang.NoSuchFieldException: field_A_
at java.lang.Class.getDeclaredField(Unknown Source)
at routines.PopulateFromDynamic.populate(PopulateFromDynamic.java:75)
... 4 more

Is there any solution about this matter?
thanks
Labels (4)
3 Replies
Anonymous
Not applicable
Author

Hi
Welcome to Talend Community!
Which version of TOS do you use?
Or I miss some details?
Regards,
Pedro
Anonymous
Not applicable
Author

Hi
Welcome to Talend Community!
Which version of TOS do you use?
Or I miss some details?
Regards,
Pedro

Hi Pedro,
I'm using TOS 5.1.1
I've uploaded the screenshot the job that I created
thanks
Anonymous
Not applicable
Author

Hi
I'm sorry this is a custom component which is not supported by Talend Officially.
Besides, it is not compatible with TOS 5.1.1.
What you can do is to create metadata->File Delimited.
The dynamic schema feature is only supported by Talend Enterprise Edition.
Regards,
Pedro