tSqoopImport additional arguments working partially

Four Stars

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.

Four Stars

Re: tSqoopImport additional arguments working partially

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

What’s New for Talend Spring ’19

Watch the recorded webinar!

Watch Now

Definitive Guide to Data Quality

Create systems and workflow to manage clean data ingestion and data transformation.

Download

Tutorial

Introduction to Talend Open Studio for Data Integration.

Watch

Downloads and Trials

Test drive Talend's enterprise products.

Downloads