massdosage commented on a change in pull request #1748:
URL: https://github.com/apache/iceberg/pull/1748#discussion_r520692681
##########
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:
OK, so, with setting that property the DDL looks better:
```
CREATE EXTERNAL TABLE `iceberg_table_from_hive_catalog`(
)
ROW FORMAT SERDE
'org.apache.iceberg.mr.hive.HiveIcebergSerDe'
STORED BY
'org.apache.iceberg.mr.hive.HiveIcebergStorageHandler'
LOCATION
's3://REDACTED/iceberg_table_from_hive_catalog'
TBLPROPERTIES (
'metadata_location'='s3://REDACTED/iceberg_table_from_hive_catalog/metadata/00000-95297465-a383-4f0b-b546-dffe7c4ff778.metadata.json',
'table_type'='ICEBERG',
'transient_lastDdlTime'='1605024789')
```
Not sure whether it's an issue that the schema information is missing? I
also can't successfully query this table from Hive so I'll look into that next
and see what the issue is. Thanks for helping me over the first hurdle though,
I'll update this PR shortly with that required config setting.
----------------------------------------------------------------
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]