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 escaped by

sqoop import escaped by

New Contributor

how to import from mysql to hdfs escaping all double quotes by "\" and wrap all the data by single quote

 

I tried to run this query by it doesn't escape double quotes:

sqoop import \
--connect jdbc:mysql: xyz   \
--username ru \

--password  xyz \
--table sgosai_test1  \
--fields-terminated-by '-' \
--lines-terminated-by ':' \
--target-dir /user/sgosai2703/solxyz \
--m 1 \
--escaped-by \\ \
--optionally-enclosed-by \'

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