You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by GitBox <gi...@apache.org> on 2020/12/08 02:07:36 UTC

[GitHub] [iceberg] XuQianJin-Stars edited a comment on issue #1884: hive document example is not work!

XuQianJin-Stars edited a comment on issue #1884:
URL: https://github.com/apache/iceberg/issues/1884#issuecomment-740310274


   hi @zuoyebushiwo  There are two ways to successfully create a hive table:
   
   1. Specify the schema information and perform the following operations to successfully create the table.
   `
   CREATE EXTERNAL TABLE customers STORED BY 'org.apache.iceberg.mr.hive.HiveIcebergStorageHandler' LOCATION 'hdfs://namenode:8020/cs/table_a' TBLPROPERTIES ('iceberg.mr.table.schema'='{"type":"struct","fields":[{"id":1,"name":"customer_id","required":false,"type":"long"},{"id":2,"name":"first_name","required":false,"type":"string"},{"id":3,"name":"last_name","required":false,"type":"string"}]}', 'iceberg.mr.table.partition.spec'='{"spec-id":0,"fields":[{"name":"customer_id","transform":"identity","source-id":1,"field-id":1000}]}', 'dummy'='test');
   `
   2.Create a hive external table on the hdfs path of the existing iceberg table.
   `
   CREATE EXTERNAL TABLE customers2 STORED BY 'org.apache.iceberg.mr.hive.HiveIcebergStorageHandler' LOCATION 'hdfs://namenode:8020/cs/table_a';
   `


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org