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




 

猜你喜欢

转载自ylzhj02.iteye.com/blog/2066613
今日推荐