Support Questions
Find answers, ask questions, and share your expertise

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 \'