简体   繁体   中英

How can I use Python to overwrite a DynamoDB table from an S3 file?

I have built queries using HIVE to pull specific data and I have it stored in S3. I tried to use HIVE to overwrite data stored in a Dynamo table, but it will not allow it to overwrite the data. Can I use Python to update the Dynamo table from the data stored in S3?

This is possible with hive itself.

You need to: "Before importing, ensure that the table exists in DynamoDB and that it has the same key schema as the previously exported DynamoDB table. If an item with the same key exists in the target DynamoDB table, it will be overwritten. If no item with the key exists in the target DynamoDB table, the item is inserted.".

There are various examples here - look for importing Hive Command Examples for Exporting, Importing, and Querying Data in DynamoDB

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM