Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Sqoop generated query

Sqoop generated query

New Contributor

Hello,

 

I have an issue with running query on SAP Hana db, in the $conditions I need column name to be eclosed by double quotes because I get the error:  SAP DBTech JDBC: [257]: sql syntax error: incorrect syntax near ...

Query should be like this:

 

SELECT "COL1", "COL2"
FROM "SAPSR3"."TABLEVIEW"
WHERE "CONDCOL">=2011 AND "CONDCOL"<=2011

 

When I run the query without --slpit-by option it works.

Is there any way to modify the way query is generated?

Also it will be very usefull to see the generated query by Sqoop.

I use Sqoop 1.4.7 and ngdbc-2.3.56.jar for connection.

 

Thank you,

Catalin

3 REPLIES 3

Re: Sqoop generated query

Master Guru
The --verbose flag may help see the query Sqoop attempts to generate.

Have you tried using --boundary-query '<your-statement>' instead of --split-by '<colname>'?

Re: Sqoop generated query

New Contributor

Hello Harsh,

 

I am using --verbose but i get no queries:

sqoop.JPG

 

also I am using  --boundary-query but I have to provide --split-by column so it is not working.

 

Highlighted

Re: Sqoop generated query

Expert Contributor

Hi,

 

Can you please upload the full Sqoop command and the console level logs so we can test it out.

 

Regards

Nitish