1
00:00:00,210 --> 00:00:06,810
In this video, we are going to update data into Diamond V table with using a SQL commands.

2
00:00:06,840 --> 00:00:10,500
In this step we will update an item into our order table.

3
00:00:10,530 --> 00:00:16,320
To do that, please open the visual code and go to the lecture folder, open command text and see that

4
00:00:16,320 --> 00:00:23,030
this time you will use this command when updating an item which is the dynamic DB update item, sailor

5
00:00:23,040 --> 00:00:23,610
command.

6
00:00:23,610 --> 00:00:26,650
And these are the configurations that we get.

7
00:00:26,850 --> 00:00:34,080
Table name information, key update expression, expression, attribute values and return values.

8
00:00:34,320 --> 00:00:39,630
So if you look at these parameters one by one, we are providing the table name that we are going to

9
00:00:39,630 --> 00:00:44,740
update and these key information get the item which will be updated.

10
00:00:44,760 --> 00:00:51,870
That's why we are providing the partition and the sort K to get item and the update expression is setting

11
00:00:51,870 --> 00:00:57,060
which attribute, which name is the description and we are setting the new world.

12
00:00:57,240 --> 00:01:03,720
So the new value will be set under the expression, attribute values and we are providing that the description

13
00:01:03,720 --> 00:01:08,040
will be the updated icon order and we would like to return all values.

14
00:01:08,040 --> 00:01:12,830
So these are the configurations when we are running the update item, Select Command.

15
00:01:12,840 --> 00:01:16,230
So let's run this command and see what's happened.

16
00:01:16,230 --> 00:01:17,880
I'm going to use the windows one.

17
00:01:17,880 --> 00:01:25,260
Windows one has this kind of multi-line character and also we will set two times double code to JSON

18
00:01:25,260 --> 00:01:25,830
values.

19
00:01:25,830 --> 00:01:30,060
So let me copy this line of select command paste in here.

20
00:01:30,060 --> 00:01:31,110
Hit Enter.

21
00:01:32,970 --> 00:01:37,560
We get the exemption, which is the we hit the resort keyword description.

22
00:01:37,560 --> 00:01:43,530
So I would like to change the description instead of we are updating the description, let's update

23
00:01:43,530 --> 00:01:44,970
the order date.

24
00:01:45,150 --> 00:01:49,380
I'm going to copy this date and come here.

25
00:01:50,430 --> 00:01:58,830
Order, date and order date will be, let's say, six.

26
00:01:59,690 --> 00:02:00,430
Zero six.

27
00:02:01,310 --> 00:02:05,420
Let's try for now we are going to update the older date information.

28
00:02:06,230 --> 00:02:07,150
Hit enter.

29
00:02:07,160 --> 00:02:14,030
In order to solve the latest exception, I have put the blank character before this expression attribute

30
00:02:14,030 --> 00:02:16,430
values in here and also in here.

31
00:02:16,430 --> 00:02:20,660
And after I have copied this command and paste in here hit enter.

32
00:02:20,870 --> 00:02:23,840
This is managed to update our item.

33
00:02:23,840 --> 00:02:25,430
You can see the response in here.

34
00:02:25,430 --> 00:02:33,780
We are going to update the attributes, the order, date and ID description and status and we have updated

35
00:02:34,310 --> 00:02:35,990
our order date information.

36
00:02:35,990 --> 00:02:43,680
So if we go back to the our measurement console, open database management console and come to the explore

37
00:02:43,700 --> 00:02:48,260
items, if you scan again, please locate these order date information.

38
00:02:48,260 --> 00:02:52,910
So this time we see that the order date information updated is the expected.

39
00:02:53,360 --> 00:03:00,650
So is the same way we can examine these item commands dynamo DB commands from the dynamic DB API reference

40
00:03:00,650 --> 00:03:01,550
documentation.

41
00:03:01,700 --> 00:03:06,770
If you search from the update item, you can come to this update item reference documentation.

42
00:03:06,770 --> 00:03:12,350
If you scroll down, you can see the all parameters that we can provide onto the CLI commands.

43
00:03:12,350 --> 00:03:17,900
And this is the API reference documentation for the updating and item to the Dynamo DB.
