massdosage commented on a change in pull request #1748:
URL: https://github.com/apache/iceberg/pull/1748#discussion_r521922877



##########
File path: site/docs/hive.md
##########
@@ -50,6 +50,19 @@ You should now be able to issue Hive SQL `SELECT` queries 
using the above table
 SELECT * from table_a;
 ```
 
+#### Using Hive Catalog
+Iceberg tables created using `HiveCatalog` are automatically registered with 
Hive. 
+
+##### Create an Iceberg table
+The first step is to create an Iceberg table using the Spark/Java/Python API 
and `HiveCatalog`. For the purposes of this documentation we will assume that 
the table is called `table_b` and that the table location is 
`s3://some_path/table_b`.
+TODO: what do we need to set up when we create this table programatically for 
everything to be registered correctly for read usage in Hive?

Review comment:
       Yes, exactly, so in this case when I'm creating a new table it doesn't 
find the value in the table metadata so it drops through to line 383 and looks 
in the `Configuration` using the `ConfigProperties` key I mentioned above which 
is `iceberg.engine.hive.enabled`. I stepped through this code to figure out why 
it wasn't working with `engine.hive.enabled` and saw the property it was 
looking for in the conf is actually `iceberg.engine.hive.enabled`. So I guess 
there are two options here:
   
   1. you explicitly create the table with metadata and set 
`engine.hive.enabled` as a table property.
   
   or 
   
   2. you set the value `iceberg.engine.hive.enabled` explicitly in the conf 
object (like I'm doing in my example code above) or let this be automatically 
set by adding it to `hive-site.xml`.
   
   If we agree on this I can document the above here ^. I
   
   I'll then look into what's necessary in order to query the table and add it.




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