David Schenk
05/08/2023, 12:55 PMRecordBatchWriter
panicked at flush_and_commit
with an ObjectStore { source: Generic { store: "DeltaS3ObjectStore", source: LockClientRequired } }
. Do any of you have any ideas or experience with this? In thread I will post some code snippets to better understand how my setup looks like.let mut storage_options = HashMap::new();
storage_options.insert("AWS_REGION".to_string(), "eu-central-1".to_string());
storage_options.insert("AWS_PROFILE".to_string(), "the_profile".to_string());
storage_options.insert("AWS_S3_LOCKING_PROVIDER".to_string(), "dynamodb".to_string());
storage_options.insert("DYNAMO_LOCK_TABLE_NAME".to_string(), "delta_writer_rust".to_string());
storage_options.insert("DYNAMO_LOCK_PARTITION_KEY_VALUE".to_string(), "lockID".to_string());
let object_store = DeltaObjectStore::try_new(table_uri.parse().unwrap(), StorageOptions::from(storage_options.clone())).unwrap();
ObjectStore { source: Generic { store: "DeltaS3ObjectStore", source: Dynamo { source: GetItemError(Validation("The provided key element does not match the schema")) } } }
But it looks to me that the schema definition is invalid that is used by delta-rs.create_table
function: https://github.com/delta-io/delta-rs/blob/0115fbb9b1ad1a6a2a1521d3b05f129fdace7327/rust/tests/common/s3.rs#L27
Recreated my dynamodb table with key
as partition key and code runs without issues. What am I missing here?rtyler
05/08/2023, 3:59 PMDYNAMO_LOCK_TABLE_NAME
set and AWS_S3_LOCKING_PROVIDER
set to dynamodb
will cover it.
Here's some terraform that sets up the dynamo table properly:
https://github.com/buoyant-data/lambda-delta-optimize/blob/main/deployment.tf#L113-L127David Schenk
05/09/2023, 6:50 AM