Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
Debasish
Partner - Contributor II
Partner - Contributor II

Parse delimited file with delimiter present in text data enclosed in double quotes

Hi ,

I need to parse and load DB a pipe delimited file having data in the below structure using Talend.

Col1|Col2|Col3

"abc|111"|100|"zzz"

"xyz|222"|200|"yyy"

  • Text fields are enclosed in double quotes.
  • Few text columns contain the delimiter inside them.

I am using dynamic schema as there are are multiple files with different schemas.(but all files follow the above rules).

Issue : It is note able to parse the entire content inside double quotes (abc|111) as single field.

Please help.

Thanks

Labels (2)
8 Replies
Vegar
MVP
MVP

Maybe something like this?

 

Load Col1,Col2,Col3 

From file.txt (unicode, txt, delimiter is '|', msq, embedded labels)

 

Update: please disregard my suggestion, it is a Qlik Sense answer. I didn't notice that "Design and Development" was a sub category within the Talend section of the community until now.

Shicong_Hong
Support
Support

Hello 

Check the 'CSV Option' checkbox if you are using tFileInputDelimited component to read the files. 

Shicong_Hong_0-1715232156867.png

Shicong_Hong_1-1715232219809.png

 

 

 

Debasish
Partner - Contributor II
Partner - Contributor II
Author

Hi ,

Thanks for the reply.

I tried the same but no difference in the output of the two tlogrow components.

Debasish_0-1715257950548.png

Debasish_2-1715257993225.png

 

Can you please share the schema that you have defined inside tExtractDynamicFields component.

Otherwise, I cannot find any difference between your mapping and mine.

 

Shicong_Hong
Support
Support

From your screenshot, I can see ABC|111 is read as a single field, this is desired result.  tExtractDynamicFields is used to extract fields from Dynamic schema.

Shicong_Hong_0-1715316851479.png

 

Debasish
Partner - Contributor II
Partner - Contributor II
Author

Do I need to create a static schema in tExtractdynamicfields component ?

If Yes , then issue is the schema will be different for multiple files.

Below is the schema of textractdynamicfields .

Debasish_0-1715326005590.png

 

Shicong_Hong
Support
Support

I just used tExctractDynamicSchema to extract fields to show you the data is read correctly. You should use the Dynamic schema if schemas are different for multiple files in your case, and you don't need a tExctractDynamicSchema component. What is your target app?

 

Debasish
Partner - Contributor II
Partner - Contributor II
Author

Hi,

I need the output like the below screenshot.

Debasish_0-1715363407575.png

Is this possible without providing a static schema in textractDynamicFields ?

Thanks

Shicong_Hong
Support
Support

tLogRow is used to print the data on the console, there is only one column with Dynamic schema, the data printed on the console looks like:

Shicong_Hong_0-1715583879451.png

If you output the data into files or databases, the data will be split into multiple fields.

Col1;Col2;Col3
abc|111;100;zzz
xyz|222;200;yyy