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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

tSqoopImport additional arguments working partially

Hi,

 

I am currently working on TOS_BD_6.1.1. 

 

I am using a tSqoopImport component with java API and it works fine, creating the file I need on the cluster.

 

However, when I try to custom my file, using "Advanced Settings -> Additionnal arguments", I am not able to produce all of the following requirements : 

- fields separated with semicolon

- fields enclosed into double quote

- escape character \ to be used to escape double quote

 

The additionnal arguments I defined are :

"codegen.output.delimiters.field" -> ";"

"codegen.output.delimiters.enclose" -> "\""

"codegen.output.delimiters.escape" -> "\\"

 

As an example, if I have a row of 3 columns with the following data : banana | ban"ana" | ban"ana

I want the file created to be like that : "banana";"ban\"ana\"";"ban\"ana"

But only the semicolon works and I got : banana;ban"ana";ban"ana

 

 

You can see my tSqoopImport configuration on the 2 screenshots attached.

Am I using them wrongly? Or is it a known bug? 

 

I saw this similar topic https://community.talend.com/t5/Design-and-Development/tsqoopimport-ignores-additional-arguments-D-m...  but the OP didn't answer.

 

Thanks for your time.

Labels (3)
1 Reply
Anonymous
Not applicable
Author

The escape character \ to escape double quote is actually working with the described configuration, but I am still not able to enclose my fields, no matter what character I choose (double quote with "\"", or another one, like "£". 

 

By default, what character are escaped ? double quote, single quote, etc..., ?

 

I have to escape them because I may encountered double quote, and special character like \t , \n in the data I extract.

 

Thanks