Open eltbus opened 3 years ago
Nevermind... this is correcty updating overwriting the item.
(df.write
.mode('append')
.option('tableName', 'MY_TABLE')
.option('region', 'eu-west-1')
.format('dynamodb')
.save())
I must probably have an error somewhere else.
But I guess I still don't know if .option('update', 'true')
works, or if Batch mode is always used.
I manually add a field with the current time stamp to use it as a TTL in DynamoDB. Sometimes all the fields in a row are the same, but I'd like to extend the TTL.
To do so, I tried using PySparks'
append
mode with.option('update', 'true')
but items don't seem to get updated. So I tried using PySparks'overwrite
:Sadly this does not work and raises the following error.
This left me wondering... why does it say "batch mode"? Is it not accepting DynamoDB's updateItem mode?
Additional packages used: