Support Questions
Find answers, ask questions, and share your expertise

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

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>'?

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.

 

Expert Contributor

Hi,

 

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

 

Regards

Nitish

Take a Tour of the Community
Don't have an account?
Your experience may be limited. Sign in to explore more.