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.

Password Encryption in Sqoop Job not working

Solved Go to solution

Password Encryption in Sqoop Job not working

New Contributor

I am using password encryption method in Sqoop job for data ingestion into Hadoop. Used Dhadoop.security.credential.provider.path to encrypt the password.

But when I try to create the Sqoop job in CLI, it is unable to parse the arguments. Below is the code I used and error I got also mentioned below.

CODE

sqoop job --create password-test --meta-connect jdbc:hsqldb:hsql://<hostname>:<port>/sqoop -- import -Dhadoop.security.credential.provider.path=jceks://hdfs/user/<username>/<username>.password.jceks --connect "jdbc:oracle:thin:<hostname>:<Port>:<sid>" --username <username> --table <tablename> --password-alias <password-alias-name> --fields-terminated-by '\001' --null-string '\N' --null-non-string '\N' --lines-terminated-by '\n' --target-dir '/user/<username>/<staging loc>' --incremental append --check-column <colname> --last-value <value> --num-mappers 8

ERROR

7819-119ti.png

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Password Encryption in Sqoop Job not working

Contributor

@Gayathri Reddy G - pass generic arguments like -D after SQOOP JOB -Dhadoop.security.credential.provider.path=jceks ....

General syntax is

sqoop-job (generic-args) (job-args) [-- [subtool-name] (subtool-args)]
3 REPLIES 3

Re: Password Encryption in Sqoop Job not working

Contributor

@Gayathri Reddy G - pass generic arguments like -D after SQOOP JOB -Dhadoop.security.credential.provider.path=jceks ....

General syntax is

sqoop-job (generic-args) (job-args) [-- [subtool-name] (subtool-args)]
Highlighted

Re: Password Encryption in Sqoop Job not working

Contributor
You must supply the generic arguments -conf, -D, and so on after the tool name but before any tool-specific arguments (such as --connect). Note that generic Hadoop arguments are preceeded by a single dash character (-), whereas tool-specific arguments start with two dashes (--), unless they are single character arguments such as -P.

https://sqoop.apache.org/docs/1.4.6/SqoopUserGuide.html#_using_generic_and_specific_arguments

Re: Password Encryption in Sqoop Job not working

New Contributor

@njayakumar passed the Generic arguments first to the sqoop job, now its working fine. Thanks

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