pvary commented on issue #2357:
URL: https://github.com/apache/iceberg/issues/2357#issuecomment-808104730


   The issue you have linked is for older version of Iceberg. It should be 
possible to read the table from Hive with 0.11.0 version of Iceberg.
   
   Based on your answers I see two problems:
   1. When you are trying to read a table stored in HiveCatalog, you should set 
the catalog to hive. This could be set in the hive-site.xml, or before issuing 
the query you could issue the following command:
   ```
   SET iceberg.mr.catalog=hive
   ```
   2. When creating the table the `iceberg.engine.hive.enabled` should be set 
to true in the config. See the relevant part in the docs:
   > The value iceberg.engine.hive.enabled needs to be set to true and added to 
the Hive configuration file on the classpath of the application creating or 
modifying (altering, inserting etc.) the table.
   
   For checking 1. you can issue `set iceberg.mr.catalog` and if the output is 
different from `hive` you should set it manually for the session (as you have 
already done based on you last comment)
   
   For checking 2. you can issue `DESCRIBE FORMATTED <table_name>` and check if 
the SerDe, InputFormat, OutputFormat is set to the correct ones. If the table 
is created correctly then it should be something like this:
   ```
   SerDe Library: org.apache.iceberg.mr.hive.HiveIcebergSerDe
   InputFormat: org.apache.iceberg.mr.hive.HiveIcebergInputFormat
   OutputFormat: org.apache.iceberg.mr.hive.HiveIcebergOutputFormat
   ```
   
   This should be done at table creation. I am not too familiar how Flink 
creates the table but alternatively it could be done at creation / modification 
time by setting the `engine.hive.enabled` Iceberg table property to `true`


-- 
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:
[email protected]



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

Reply via email to