-
Notifications
You must be signed in to change notification settings - Fork 421
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow to specify Azurite hostname and service port as backend #2900
Comments
You should refer to the object store docs for this |
Thank you for your reply. I'm not sure to know what you're talking about. May you give me some more explanations? thanks! |
I think you need to set the env variable
and adding a sleep to the Python script to wait for container creation changes the error message to
so seems like it's connecting properly. No idea where this might actually be documented, but found it from object_store source https://docs.rs/object_store/latest/src/object_store/azure/builder.rs.html#827 and the integration test workflow delta-rs/.github/workflows/build.yml Line 107 in 5d10cbe
|
I've missed that configuration option! Thank you, it should do the trick. |
The library allows to use Azurite as a valid backend for reading/writing delta files through a storage option
AZURE_STORAGE_USE_EMULATOR="1"
. This option assumes that the Azurite server is running on127.0.0.1
and that the blob service is listening to port10000
which are the defaults when running Azurite locally. However, there is no way to use a different port nor hostname for Azurite.Use Case
This is limitating when you run Azurite in a Docker compose and you want your Python application, running as another service in your compose file, to reach Azurite. Indeed, when your Python application runs through Docker, it tries to connect to Azurite using
127.0.0.1:10000
but this no longer work because this points to the python application container itself.Instead, the Azurite service is available through an alias (which is the name of the service in the Docker compose file). I would like to be able to use the emulator and override the Azurite hostname (and eventually its port).
Example
Consider the following Docker compose file which starts a Python app trying to read a table from Azurite. Both Azurite and the deltalake client are in the same docker network.
Run it
You'll get the following error in logs
As you can see,
deltalake
tries to connect to127.0.0.1
instead ofazurite
.The text was updated successfully, but these errors were encountered: