apache / iceberg-python

Apache PyIceberg
https://py.iceberg.apache.org/
Apache License 2.0
375 stars 137 forks source link

PyIceberg with Azure Storage Account (500 Internal Server Error) #939

Open C-Zuge opened 1 month ago

C-Zuge commented 1 month ago

Question

While using the pyiceberg got some issues/questions that blocked me, mainly regarding an internal server error 500 after the execution of a simple "create_table" function. Since I'm pretty new on iceberg stuff, probably I'm missing something that I don't know more about. Could anyone help me? I created a namespace and list it, but as soon as I try to create a table on my azure storage account I got the same error 500. My credentials are right, but im using the connection string and pointing the "warehouse" parameter to my storage account such as: "abfs://container>@<storage_account.dfs.core.windows.net/". image

I was looking the dockerfile and didnt saw anything that i should change regarding credentials.

kevinjqliu commented 1 month ago

Pyiceberg can be used as either a client or a server. In the example above, the load_catalog function creates a client using the Pyiceberg library. This client is used to interact with the rest of the ecosystem.

For load_catalog, when given an uri param, the function creates a REST catalog client. Calling the subsequent create_namespace function will send an HTTP request to the REST catalog server address (localhost:8000).

The 500 error is related to a server issue, which means the server running on port 8000 has errored.

Here's the doc on REST catalog configs https://github.com/apache/iceberg-python/blob/main/mkdocs/docs/configuration.md#rest-catalog

kevinjqliu commented 1 month ago

Note you can use the load_catalog function to create other types of catalogs. In the "Getting started" guide, there's an example of creating an on-disk SQLite catalog https://github.com/apache/iceberg-python/blob/main/mkdocs/docs/index.md#connecting-to-a-catalog

kevinjqliu commented 1 month ago

For the issue with running the REST server with Pyiceberg, I see you've created this issue https://github.com/kevinjqliu/iceberg-rest-catalog/issues/4

I'll answer on that thread