2017-04-06 130 views

回答

1

是的,你可以通过Sqoop导入Hive表格存储为Parquet。

Sqoop has added Parquet Support

sqoop import \ 
--connect jdbc:mysql://the_mysql_server/the_mysql_database \ 
--username the_mysql_user --password the_mysql_password \ 
--table sourcetablename\ 
--hive-import –hive-table destinationtablename\ 
--as-parquetfile -m 1 

如果你想改变数据类型蜂巢数据类型而从RDBMS

e.g

使用此参数导入数据--map-column-hive col1=hivedatatype,col2=hivedatatype

sqoop import \ 
... 
... 
--map-column-hive id=STRING,price=DECIMAL