Closed
Description
Environment
Delta-rs version: 0.15.0
Binding: python
Environment:
- Cloud provider: AWS
- OS: AWS
- Other: Py3.10
Bug
What happened: When writing to a partitioned deltalake table on s3 with dynamo as the locking provider, the following error is thrown:
Traceback (most recent call last):
...
write_deltalake(
File "/Users/alex/.pyenv/versions/3.10.3/envs/hft-3.10/lib/python3.10/site-packages/deltalake/writer.py", line 244, in write_deltalake
table, table_uri = try_get_table_and_table_uri(table_or_uri, storage_options)
File "/Users/alex/.pyenv/versions/3.10.3/envs/hft-3.10/lib/python3.10/site-packages/deltalake/writer.py", line 620, in try_get_table_and_table_uri
table = try_get_deltatable(table_or_uri, storage_options)
File "/Users/alex/.pyenv/versions/3.10.3/envs/hft-3.10/lib/python3.10/site-packages/deltalake/writer.py", line 633, in try_get_deltatable
return DeltaTable(table_uri, storage_options=storage_options)
File "/Users/alex/.pyenv/versions/3.10.3/envs/hft-3.10/lib/python3.10/site-packages/deltalake/table.py", line 319, in __init__
self._table = RawDeltaTable(
_internal.DeltaError: Generic error: error in DynamoDb
What you expected to happen: Successful table update.
How to reproduce it: I have an s3/dynamo config set up per the production config instructions in the docs.
Pseudocode:
from deltalake.writer import write_deltalake
storage_options = {
"AWS_REGION": "us-east-1",
"AWS_ACCESS_KEY_ID": AWS_ACCESS_KEY,
"AWS_SECRET_ACCESS_KEY": AWS_ACCESS_SECRET,
"AWS_S3_LOCKING_PROVIDER": "dynamodb",
"DYNAMO_LOCK_TABLE_NAME": "deltalake-lock",
"DYNAMO_LOCK_PARTITION_KEY_VALUE": "table1"
}
write_deltalake(
data_path,
df, # Some dataframe
mode="append",
storage_options=storage_options,
partition_by=partition_cols, # partition columns for dataframe
schema=table_schema # schema defined for dataframe
)
The same codepath works in 0.14.
More details: N/A
Activity