1
00:00:00,330 --> 00:00:07,620
In this video, we are going to write items in back into Dynamo DB table, so we will use batch write

2
00:00:07,620 --> 00:00:10,260
item command when we are performing this action.

3
00:00:10,380 --> 00:00:17,910
To do that, please open the documentation which is the client dynamo DB and go to the beach write item

4
00:00:17,910 --> 00:00:20,250
command to see details in here.

5
00:00:20,280 --> 00:00:25,710
If you scroll down you can see that the example usage of the batch write item command.

6
00:00:25,710 --> 00:00:31,790
This is the R command and we will use these input format when preparing parameters.

7
00:00:31,800 --> 00:00:34,470
We can see that there is a request items collection.

8
00:00:34,470 --> 00:00:39,790
If you click the request items, you can see that this is the items collection that we are going to

9
00:00:39,810 --> 00:00:42,120
writing back into Dynamo DB table.

10
00:00:42,360 --> 00:00:49,380
So to perform this action, please open the visual code and I have created the right batch item and

11
00:00:49,380 --> 00:00:51,480
let me explain this code.

12
00:00:51,510 --> 00:00:57,360
As you can see that we are using the same structure and this time we will use batch write item command

13
00:00:57,360 --> 00:01:00,990
and this command is importing in this statement.

14
00:01:00,990 --> 00:01:03,120
And the important difference is parameters.

15
00:01:03,120 --> 00:01:08,340
If you come to parameters, you can see that we are using the request items collection, we are giving

16
00:01:08,340 --> 00:01:10,290
the table name, which is the product.

17
00:01:10,380 --> 00:01:14,400
And in the table name we can perform put request two times.

18
00:01:14,400 --> 00:01:20,700
We are performing to put request and we are inserting, inserting a new item which ID one and ID two.

19
00:01:20,700 --> 00:01:26,250
So this will be insert to item into dynamo DB table which table name is product.

20
00:01:26,400 --> 00:01:33,450
So to implement this, please come here and run the node command note right.

21
00:01:33,450 --> 00:01:35,430
Batch command hit enter.

22
00:01:35,970 --> 00:01:43,080
So as you can see that we have successfully insert items to verify that please open the console and

23
00:01:43,080 --> 00:01:44,430
run the scan command.

24
00:01:44,850 --> 00:01:48,300
See that we have inserted two items successfully.
