2017-04-06 60 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