sqoop1:import to hive with comma delimilated fields

I want to import data with tree fileds from mysql table to hdfs with hive metastore integaration. I want to the data format stored in hdfs likes

field1,field2,field3

....

which these fileds in a record delimilated by comma(,), to achive this format, two things should be pay attention to.

a. sqoop import statement should be contain (I used hue)

          <arg>--fields-terminated-by</arg>
          <arg>,</arg>

 b. when create hive metastore table, should change the filed delimilater



sqoop1:import to hive with comma delimilated fields_第1张图片
 

你可能感兴趣的:(import)