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



##########
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:
       > Also, `engine.hive.enabled` is the table property. When a table has 
that property, it will be created with the storage handler. I set the property 
on my table from Spark and it worked.
   
   Really? From what I can see the code uses the value from here 
https://github.com/apache/iceberg/blob/b4030093b222a96a979d2964eecd6cdd3e9f7608/core/src/main/java/org/apache/iceberg/hadoop/ConfigProperties.java#L27
 which is prefixed with `iceberg` as I said above. I tried it both ways and 
only this way worked but the schema in the Hive table definition is empty so 
Hive seems to be throwing an error about that when it tries to query it. I 
haven't tried setting `iceberg.mr.catalog=hive` in Hive when I do the query, I 
will try that next and see if it makes any difference and what impact that has 
on the HadoopTables version of 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