0
votes

I'm trying to export a hive table to Oracle using sqoop export command. The hive table have fields delimited by '|' and also escaped by '\'.Sqoop export jobs are failing while parsing records with delimiter escaped fields. I tried setting 'escaped-by' option.It seems not working.Is there any way to specify escape characters for sqoop Export. The below is the command I tried.

sqoop export \
--connect jdbc:oracle:thin:@//testserver:1521/testSchema \
--username user \
--password pwd \
--table test  \
--direct \
--escaped-by \\ \
--fields-terminated-by '|' \
--input-lines-terminated-by '\n' \
--export-dir /user/etl/test/
1

1 Answers

0
votes

Your Command has some issue. you should use --input-fields-terminated-by '|' instead of using --fields terminated by '|'.