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 import free form SQl query error for multiple tables join (where $condition)

Sqoop import free form SQl query error for multiple tables join (where $condition)

New Contributor

Hi, 

I have been trying to use sqoop import using join 2 tables into hdfs folder using SQL free form query . Tried multiple times with various scenarios but keep on having the same error  about not having the $Condition ? 

sqoop error1.JPG

 

 

 

 

 

 

 

 

 

 

this is my query looks like 

 

 

sqoop import \
--connect (mask out)\
--username (mask out) --password (mask out)\
--query "SELECT od.orderdate,pdt.productid, pdt.productname,ord.orderquantity,ord.orderprice,
cust.customerid,cust.first_name,cust.last_name
from products pdt
inner join orderdetails ord
on pdt.productid = ord.productid WHERE $CONDITIONS
inner join orders od
on od.orderid = ord.orderid WHERE $CONDITIONS
inner join customers cust
on cust.customerid = od.customerid WHERE $CONDITIONS
WHERE $CONDITIONS od.orderdate between '2018-01-26' and '2018-01-31'" \
--split-by od.orderdate \
--target-dir /user/cloudera/2tables

 

 

Thank you very much for your help! Appreciated!

2 REPLIES 2

Re: Sqoop import free form SQl query error for multiple tables join (where $condition)

New Contributor

Hi, 

Managed to resolve this! Closed thread!

Highlighted

Re: Sqoop import free form SQl query error for multiple tables join (where $condition)

Community Manager

@valsnoky please explain further how you resolved your issue. It may be of assistance to others in a similar situation.



Cy Jervis, Community Manager

Was your question answered? Make sure to mark the answer as the accepted solution.
If you find a reply useful, say thanks by clicking on the thumbs up button.

Learn more about the Cloudera Community:
Community Guidelines
How to use the forum
Don't have an account?
Coming from Hortonworks? Activate your account here