IcebergRestCatalogService — Apache Iceberg REST APIs¶
IcebergRestCatalogService
is a Unity Catalog API service to handle HTTP requests at /api/2.1/unity-catalog/iceberg URL.
Method | URL | Handler | Params |
---|---|---|---|
GET | /v1/config | config | |
GET | /v1/namespaces/[namespace] | getNamespace | namespace |
GET | /v1/namespaces | listNamespaces | parent |
GET | /v1/namespaces/[namespace]/tables | listTables | namespace |
GET | /v1/namespaces/[namespace]/tables/[table] | loadTable | namespace table |
POST | /v1/namespaces/[namespace]/tables/[table]/metrics | reportMetrics | namespace table |
HEAD | /v1/namespaces/[namespace]/tables/[table] | tableExists | namespace table |
IcebergRestCatalogService
uses Hibernate.
Create Instance¶
IcebergRestCatalogService
takes the following to be created:
IcebergRestCatalogService
is created when:
UnityCatalogServer
is requested to add the API services
MetadataService¶
IcebergRestCatalogService
is given a MetadataService when created.
This MetadataService
is used to load an iceberg table.
CatalogService¶
IcebergRestCatalogService
is given a CatalogService when created.
This CatalogService
is used for the following:
- listNamespaces with no parent
- getNamespace with the catalog only (the first layer of Unity Catalog's three-level namespace)
SessionFactory¶
IcebergRestCatalogService
creates a SessionFactory when created.
This SessionFactory
is used for the following:
Load Table¶
loadTable
expects the given namespace
to be two-part and splits it into catalog and schema parts (using .
as the separator).
loadTable
requests the TableRepository to get the table metadata (by the given namespace
and table
separated using .
).
loadTable
requests the TableRepository for the uniform metadata location (by the catalog, schema and the given table
).
loadTable
requests the MetadataService for the TableMetadata for the uniform metadata location.
In the end, loadTable
responds with the TableMetadata
.