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

[resolved] Input Delimited File Multiple Field Separators

Hey everyone,
In Excel it's possible to specify more than 1 column separator when you convert the text of a CSV file to columns, like , or ; or you can even specify a separator on your own.
Now the question I have is this: is it possible to have multiple field separators in a Delimited Input File component? I am currently using ";", but I'd like to have "|" as well. Any ideas?
Thanks!
Cihan
Labels (3)
1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

design job like below this will solve your problem.

tFileInputfullRow-----tjavaRow----tExtractDelimitedField-------Main---YourOutput.
1. inTjavaRow generate code and write below statement.
output_row.line = input_row.line.replace("|", ";");
2. configure tExtractDelimitedField field component with filed-separator =";" and then add schema for same.

this way you don`t need to wary about more than on delimiter.

View solution in original post

8 Replies
willm1
Creator
Creator

Hello... You mean, have 2 delimiters in a file at the same time? Either ";" or "|"?
Anonymous
Not applicable
Author

Yes, in the same file, ";" and "|". I want to use both.
You can do it in Excel and I would like to know if you can use more than 1 field separator in Talend.
Thank you!
Anonymous
Not applicable
Author

design job like below this will solve your problem.

tFileInputfullRow-----tjavaRow----tExtractDelimitedField-------Main---YourOutput.
1. inTjavaRow generate code and write below statement.
output_row.line = input_row.line.replace("|", ";");
2. configure tExtractDelimitedField field component with filed-separator =";" and then add schema for same.

this way you don`t need to wary about more than on delimiter.
Anonymous
Not applicable
Author

Sorry for the late reply, because of the weekend + forum maintenance.
I have redesigned my job according to your message, but I'm getting the following error at the tJavaRow component:
"line cannot be resolved or is not a field"
When I check the schema of my tFileInputFullRow, my column is designated as "line", but somehow it doesn't get recognised.
Any ideas?
Anonymous
Not applicable
Author

Hi cihanc83,

Did you use "Main" row between tFileInputFullRow and tjavarow? Would you mind uploading your job workflow screenshot into forum?
Best regards
Sabrina
Anonymous
Not applicable
Author

Here is my screenshot (please ignore the deactivated job, that is the old one):
0683p000009MEaJ.png
By the way, I love the new forum features, especially for uploading files and screenshots. They seem more intuitive now.
Anonymous
Not applicable
Author

Hi,
Have you already clicked "Sync columns" in tjavaRow? Is there any error line when you switch to "Code" mode?
Best regards
Sabrina
Anonymous
Not applicable
Author

Thanks everyone, that did it!