In this tutorial, you'll learn how to do a bulk insert into a DynamoDB table using BatchWriteItem AWS CLI command.
aws dynamodb batch-write-item --request-items file://sample.json
[ Ссылка ]
—
Facebook: [ Ссылка ]
—
Video Transcript:
_
Hi guys, this is Abhi from Gokcedb. In this video, you're going to learn how to do a bulk insert into a dynamo DB table using AWS CLI.
Let's start by navigating to the dynamo DB service then click on create a table. Give your table a name, and specify a partition key and a sort key.
Leave everything else to default then create a table. Next, we're going to do a bulk insert into the property table using the batch write item operation. I use the put request syntax from the AWS guide to prepare a JSON file for my property inserts.
Here you can see that I'm specifying the value for my partition key sort key additional attributes bulk insert. These 12 records use the AWS dynamo DB followed by the batch write item command. You'll also need to specify the requested item switch followed by the location of the JSON file.
Before executing this command, make sure your table is in an active State and your AWS user has appropriate dynamo DB permission. Looks like everything went through as expected. To verify, let's go back to the dynamo DB window and click on explore items.
Select your table and confirm that the number of items returned is equal to the number of items in your JSON file. Now, you can use a filter expression like return all the items where the property size in acres is greater than or equal to 1 or 1.5. There you have it.
Make sure you like, subscribe, and turn on the notification bell. Until next time.
Ещё видео!