1

Since one of my field in Hive table contains all special characters, I have delimited the hive fields using MultiDelimitSerDe(~#). Now these data needs to be exported to My sql using Sqoop export. And I do not see Sqoop to export with multiple delimiter.

Is there any other approach? These fields have datatype - date,bigint,decimal(16,2) and char(3). Hence can't go with substr.

Aavik
  • 967
  • 19
  • 48

1 Answers1

0

Because you have all the special characters in your data, you can use the space or tab delimiter in the table and mention the delimiter for sqoop export as space or tab delimiter.

arguments --input-fields-terminated-by and --input-lines-terminated-by

Tab delimiter

--input-fields-terminated-by "\t"
roh
  • 1,033
  • 1
  • 11
  • 19
  • The tab would not work since it is a name field which might contain tab as well. – Aavik Dec 15 '17 at 09:25
  • It’s better to go with custom delimiter, refer the stack link that explained this : https://stackoverflow.com/questions/38825285/load-data-into-hive-with-custom-delimiter – roh Dec 15 '17 at 14:41