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.

How can we pass a where condition to sqoop using a file?

Highlighted

How can we pass a where condition to sqoop using a file?

Explorer

I want to use the value stored in a hdfs file to pull information from my source database.

 

My file is in HDFS:

$ hdfs dfs -cat /tmp/hmb/000000_0
2958

 

Now, I just need to run the following query in sqoop:

select * from NodeName where id > (value from the file) and $CONDITIONS

 

How can I do that?

Don't have an account?
Coming from Hortonworks? Activate your account here