deepeye opened a new issue #3092:
URL: https://github.com/apache/iceberg/issues/3092


   
   ./bin/sql-client.sh embedded  shell
   
   ## create hive catalog
   `
   Flink SQL> CREATE CATALOG hive_catalog WITH (
     'type'='iceberg',
     'catalog-type'='hive',
     'uri'='thrift://localhost:9083',
     'clients'='5',
     'property-version'='1',
     'io-impl'='org.apache.iceberg.aliyun.oss.OSSFileIO',
     'oss.endpoint'='{endpoint}',
     'oss.access.key.id'='{key.id}',
     'oss.access.key.secret'='{key.secret}',
     'warehouse'='oss://{bucket}/iceberg/warehouse'
   );
   
   Flink SQL> USE CATALOG hive_catalog;
   
   Flink SQL> CREATE DATABASE oss_db;
   
   Flink SQL> USE oss_db;
   
   Flink SQL> CREATE TABLE sample (
     id BIGINT COMMENT 'unique id',
     data STRING
   );
   Flink SQL> INSERT INTO sample VALUES (1, 'a'), (2, 'b'), (3, 'c');
   
   Flink SQL> SELECT * FROM sample;
   `
   Flink sql can read data from sample,but switch hive shell, I read empty 
table, why?
   
   This is hive external table
   `
   CREATE` EXTERNAL TABLE `hive_db.sample`(
     `id` bigint,
     `data` string)
   STORED BY 
     'org.apache.iceberg.mr.hive.HiveIcebergStorageHandler'
   LOCATION
     'oss://{bucket}/iceberg/warehouse/oss_db.db/sample'
   TBLPROPERTIES (
     
'metadata_location'='oss://{bucket}/iceberg/warehouse/oss_db.db/sample/metadata/00003-add0c7f9-a5b6-4de4-be76-19481d0420d0.metadata.json',
     'table_type'='ICEBERG',
     'iceberg.catalog'='hive_catalog');
   `


-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to