cancel
Showing results forย 
Search instead forย 
Did you mean:ย 
Warehousing & Analytics
Engage in discussions on data warehousing, analytics, and BI solutions within the Databricks Community. Share insights, tips, and best practices for leveraging data for informed decision-making.
cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

Got error using Opensharing Get Table API to foreign iceberg table

Ji-Seung
New Contributor II

Hi, There is Get Table api in open sharing. and I faced error while using it. test_iceberg_table is foreign iceberg table.

curl -s -X GET \
      'https://frankfurt.cloud.databricks.com/api/2.0/delta-sharing/metastores/617a9420-4294-453a-8a56-ea87...' \
      -H 'Authorization: Bearer xxx'

{"error_code":"ENDPOINT_NOT_FOUND","message":"No API found for 'GET /delta-sharing/metastores/617a9420-4294-453a-8a56-ea87eb418006/shares/share_test/schemas/iceberg_database/tables/test_iceberg_table'","details":[{"@type":"type.googleapis.com/google.rpc.RequestInfo","request_id":"1d24b5d0-7b72-4b60-943d-014a20eb83c9","serving_data":""}]}

FYI,  queryTableMetdata api succeeded, which looks similar.

curl -s -X GET \
      'https://frankfurt.cloud.databricks.com/api/2.0/delta-sharing/metastores/617a9420-4294-453a-8a56-ea87...' \
      -H 'Authorization: Bearer xxx'

The following iceberg load table api succeeded as well. 

curl -s -X GET \
      'https://frankfurt.cloud.databricks.com/api/2.0/delta-sharing/metastores/617a9420-4294-453a-8a56-ea87...' \
      -H 'Authorization: Bearer xxx'

Thank you in advance.
Best regards,
Ji-Seung Ryu

2 REPLIES 2

GabFernandes
Contributor

Hi @Ji-Seung,

The ENDPOINT_NOT_FOUND error makes sense โ€” the endpoint you're trying to call does not exist in the Delta Sharing open protocol. There is no standalone "Get Table" (singular) endpoint at that path.


The Delta Sharing Protocol Endpoints for Tables

Here are the actual available endpoints under the Delta Sharing recipient API path (/api/2.0/delta-sharing/metastores/{metastore_id}/...):

Method Path Purpose Status for you

GET.../shares/{share}/schemas/{schema}/tablesList all tables in a schemaShould work
GET.../shares/{share}/schemas/{schema}/tables/{table}/metadataQuery table metadataโœ… You confirmed this works
GET.../shares/{share}/schemas/{schema}/tables/{table}/versionGet table versionShould work
POST.../shares/{share}/schemas/{schema}/tables/{table}/queryQuery table data (with predicates/limits)Should work
GET.../shares/{share}/all-tablesList all tables across all schemasShould work

And for the Iceberg REST Catalog interface:

Method Path Purpose Status for you

GET.../iceberg/v1/namespaces/{namespace}/tables/{table}Load table (Iceberg metadata)โœ… You confirmed this works

What's Missing

Notice there is no:

GET .../shares/{share}/schemas/{schema}/tables/{table}

This path (without a trailing /metadata, /version, or /query) is simply not a valid endpoint in the Delta Sharing protocol. The protocol was designed so that you either:

  • List tables in a schema (get all table names/metadata at once)
  • Query a specific table's metadata, version, or data

There's no intermediate "get table details" endpoint like you'd find in the Unity Catalog API (GET /api/2.1/unity-catalog/tables/{full_name}).


What to Use Instead

Depending on what info you need:

If you want table metadata (schema, partition columns, etc.):

curl -s -X GET \
  'https://frankfurt.cloud.databricks.com/api/2.0/delta-sharing/metastores/<metastore_id>/shares/share_test/schemas/iceberg_database/tables/test_iceberg_table/metadata' \
  -H 'Authorization: Bearer xxx'

(You already confirmed this works โœ…)

If you want to confirm a table exists and get its basic info:

# List tables in the schema and filter for your table
curl -s -X GET \
  'https://frankfurt.cloud.databricks.com/api/2.0/delta-sharing/metastores/<metastore_id>/shares/share_test/schemas/iceberg_database/tables' \
  -H 'Authorization: Bearer xxx'

If you want the Iceberg table metadata (for Iceberg clients):

# Use the Iceberg REST Catalog API (you confirmed this works)
curl -s -X GET \
  'https://frankfurt.cloud.databricks.com/api/2.0/delta-sharing/metastores/<metastore_id>/iceberg/v1/namespaces/iceberg_database/tables/test_iceberg_table' \
  -H 'Authorization: Bearer xxx'

Why the Confusion?

The Delta Sharing open protocol spec (on GitHub: delta-io/delta-sharing) doesn't define a "Get Table" endpoint. Some documentation or API reference pages may list it, but the Databricks implementation follows the open protocol strictly for the /delta-sharing/ path.

The Iceberg loadTable endpoint works because that follows the Apache Iceberg REST Catalog spec, which does have an individual table retrieval endpoint.


Summary

What you tried Why it fails

GET .../tables/test_iceberg_tableThis endpoint doesn't exist in the Delta Sharing protocol
GET .../tables/test_iceberg_table/metadataโœ… Works โ€” this IS a valid endpoint
GET .../iceberg/v1/.../tables/test_iceberg_tableโœ… Works โ€” Iceberg REST Catalog spec has this endpoint

Use /metadata or the Iceberg loadTable API to get the table information you need. If you need to enumerate tables, use the List Tables endpoint (GET .../schemas/{schema}/tables without a table name at the end).

Hope this clarifies things!

Thank you for the explanation @GabFernandes.
I understand there was no endpoint like GET .../tables/test_iceberg_table in the existing delta sharing. But, There is a Get Table api in the opensharing protocol. I have been suspecting that this just hasnโ€™t been implemented yet, since other apis there like list_table_in_schema , list_all_tables_in_share worked well.