-
Notifications
You must be signed in to change notification settings - Fork 414
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
Problem writing to azure file share. #3053
Comments
It might be an easy fix, I think we just need to add a create flag |
@ion-elgreco I'm not sure I understand. Can you elaborate? |
This doesn't make a difference if that is what you mean. write_deltalake(
delta_table_path,
df,
mode="append",
partition_by=["day"],
storage_options={"create": "true"},
)´´´ |
No that's not what I mean. Can you run your script and before importing deltalake, set the environment variable: RUST_LOG=DEBUG, then share those logs here |
@ion-elgreco Here is the output when running locally on windows: [2024-12-16T08:27:16Z DEBUG deltalake_core::table::builder] creating table builder with file://XXXXX.file.core.windows.net/dev/delta-problem-demo
[2024-12-16T08:27:16Z DEBUG deltalake_core::table::builder] build_storage() with file://XXXXX.file.core.windows.net/dev/delta-problem-demo
[2024-12-16T08:27:16Z DEBUG deltalake_core::table::builder] Loading a logstore based off the location: Url { scheme: "file", cannot_be_a_base: false, username: "", password: None, host: Some(Domain("XXXXX.file.core.windows.net")), port: None, path: "/dev/delta-problem-demo", query: None, fragment: None }
[2024-12-16T08:27:16Z DEBUG deltalake_core::logstore] Found a storage provider for file:/// (file://XXXXX.file.core.windows.net/dev/delta-problem-demo)
[2024-12-16T08:27:16Z DEBUG deltalake_core::logstore] Found a logstore provider for file:///
[2024-12-16T08:27:17Z DEBUG deltalake_core::table::builder] creating table builder with file://XXXXX.file.core.windows.net/dev/delta-problem-demo
[2024-12-16T08:27:17Z DEBUG deltalake_core::table::builder] build_storage() with file://XXXXX.file.core.windows.net/dev/delta-problem-demo
[2024-12-16T08:27:17Z DEBUG deltalake_core::table::builder] Loading a logstore based off the location: Url { scheme: "file", cannot_be_a_base: false, username: "", password: None, host: Some(Domain("XXXXX.file.core.windows.net")), port: None, path: "/dev/delta-problem-demo", query: None, fragment: None }
[2024-12-16T08:27:17Z DEBUG deltalake_core::logstore] Found a storage provider for file:/// (file://XXXXX.file.core.windows.net/dev/delta-problem-demo)
[2024-12-16T08:27:17Z DEBUG deltalake_core::logstore] Found a logstore provider for file:///
[2024-12-16T08:27:17Z DEBUG deltalake_core::operations::write] write_execution_plan_with_predicate did not send any batches, no sender.
[2024-12-16T08:27:17Z DEBUG deltalake_core::operations::write] write_execution_plan_with_predicate did not send any batches, no sender.
[2024-12-16T08:27:17Z DEBUG deltalake_core::operations::write] write_execution_plan_with_predicate did not send any batches, no sender. Here is the output when running on kubernetes with debian: devuser_delta_table_conversion@app-0:~$ python show_write_problem.py
[2024-12-16T08:42:20Z DEBUG deltalake_core::table::builder] creating table builder with file:///mnt/azurefile/delta-problem-demo
[2024-12-16T08:42:20Z DEBUG deltalake_core::table::builder] build_storage() with file:///mnt/azurefile/delta-problem-demo
[2024-12-16T08:42:20Z DEBUG deltalake_core::table::builder] Loading a logstore based off the location: Url { scheme: "file", cannot_be_a_base: false, username: "", password: None, host: None, port: None, path: "/mnt/azurefile/delta-problem-demo", query: None, fragment: None }
[2024-12-16T08:42:20Z DEBUG deltalake_core::logstore] Found a storage provider for file:/// (file:///mnt/azurefile/delta-problem-demo)
[2024-12-16T08:42:20Z DEBUG deltalake_core::logstore] Found a logstore provider for file:///
[2024-12-16T08:42:20Z DEBUG deltalake_core::table::builder] creating table builder with file:///mnt/azurefile/delta-problem-demo
[2024-12-16T08:42:20Z DEBUG deltalake_core::table::builder] build_storage() with file:///mnt/azurefile/delta-problem-demo
[2024-12-16T08:42:20Z DEBUG deltalake_core::table::builder] Loading a logstore based off the location: Url { scheme: "file", cannot_be_a_base: false, username: "", password: None, host: None, port: None, path: "/mnt/azurefile/delta-problem-demo", query: None, fragment: None }
[2024-12-16T08:42:20Z DEBUG deltalake_core::logstore] Found a storage provider for file:/// (file:///mnt/azurefile/delta-problem-demo)
[2024-12-16T08:42:20Z DEBUG deltalake_core::logstore] Found a logstore provider for file:///
[2024-12-16T08:42:20Z DEBUG deltalake_core::operations::write] write_execution_plan_with_predicate did not send any batches, no sender.
[2024-12-16T08:42:20Z DEBUG deltalake_core::operations::write] write_execution_plan_with_predicate did not send any batches, no sender.
[2024-12-16T08:42:20Z DEBUG deltalake_core::operations::write] write_execution_plan_with_predicate did not send any batches, no sender. |
@PeterThramkrongart you didn't set allow_unsafe_rename, you need to do that since you are using mounted storage. Azure file share simply doesn't support these rename requests. Since you are on azure, you should write directly to adls |
@PeterThramkrongart you can create a clarifying question in https://github.com/apache/arrow-rs/issues, they might be able to explain more in depth why Azure File Share doesn't support certain FS operations |
Thanks. I don't think I need to hunt this down any further. Ideally my company wanted to use Azure fs because of cost considerations. I just needed to confirm that my problem with writing to delta isn't due to my coding errors, but rather a lack of support for mounted drives. Adls is gonna have do for now. |
Environment
Python 3.11
Delta-rs version:
deltalake==0.21.0
Environment:
-Azure fileshare
Bug
I have trouble writing to file share. I'm forced to set
storage_options={"allow_unsafe_rename":"true"}.
What happened:
This is the error I get when I run it in kubernetes:
File "/usr/local/lib/python3.11/site-packages/deltalake/writer.py", line 323, in write_deltalake\n write_deltalake_rust(\n', 'OSError: Generic LocalFileSystem error: Unable to rename file: Operation not supported (os error 95)\n']
This is the error I get when I run it locally (with mounted drive): ```
write_to_delta()
File "c:\Users\PeterThramkrongart\RaptorScripts\raw-tracking-delta-converter\show_write_problem.py", line 38, in write_to_delta
write_deltalake(
File "C:\Users\PeterThramkrongart\anaconda3\envs\delta-test-env\Lib\site-packages\deltalake\writer.py", line 323, in write_deltalake
write_deltalake_rust(
OSError: Generic LocalFileSystem error: Unable to rename file: The parameter is incorrect. (os error 87)
the parquet files are written and partitioned correctly, but the deltalog is never written.
What you expected to happen:
I expected to be able to write without any problems
How to reproduce it:
The text was updated successfully, but these errors were encountered: