Reply
New Contributor
Posts: 2
Registered: ‎03-13-2019

Sqoop generated query

[ Edited ]

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

Posts: 1,883
Kudos: 422
Solutions: 297
Registered: ‎07-31-2013

Re: Sqoop generated query

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>'?
Highlighted
New Contributor
Posts: 2
Registered: ‎03-13-2019

Re: Sqoop generated query

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.

 

Cloudera Employee
Posts: 60
Registered: ‎04-03-2017

Re: Sqoop generated query

Hi,

 

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

 

Regards

Nitish

Announcements
New solutions