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 Dynamic Import?

Highlighted

Sqoop Dynamic Import?

Explorer

1. How to write the dynamic sqoop command

i have 10 tables in the mysql database but i want to move the 5 to hive using sqoop

Please share the query

2. How to pass the parameter dynamically in sqoop query

"sqoop job --create incjoba12 -- import --connect jdbc:mysql://xxxx/db--driver com.mysql.jdbc.Driver --username zzz --table a1 -- --target-dir /tmp/a1 -m 1 "

instead of give the username password connection string and drivers.

Please try to help me to solve this problem

thanks in advance

5 REPLIES 5
Highlighted

Re: Sqoop Dynamic Import?

Expert Contributor

I am not sure I understand you correctly. It looks like you want to have parameters provided on the fly.

In that case, you need to code with shell script, and embed your sqoop command in the script, and provide parameter either at prompt or from a file. Sqoop does allow you provide password from a file.

Highlighted

Re: Sqoop Dynamic Import?

Explorer

Thank u frank

Please share the sample shell script with dynamic sqoop import

Please help me to solve this problem

Thankx in advance

Highlighted

Re: Sqoop Dynamic Import?

Explorer

Thank frank.

Please share sample shell script with dynamic sqoop import

Please helpme to solve this problem

Thankx in advance

Re: Sqoop Dynamic Import?

Check out the answers to https://community.hortonworks.com/questions/64361/how-to-implement-and-deploying-our-own-sqoop-frame... as I think we're talking about the same things there.

Highlighted

Re: Sqoop Dynamic Import?

Explorer

thank u lester

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