1
00:00:00,300 --> 00:00:06,330
In this video, we are going to add an item in the dynamic DB table using the particle scripts.

2
00:00:06,330 --> 00:00:09,480
We will use execute statement command for this action.

3
00:00:09,630 --> 00:00:15,840
As you can see that I have created a separate JavaScript file which is a particular input item and use

4
00:00:15,840 --> 00:00:18,870
the execute statement command and passing these parameters.

5
00:00:19,260 --> 00:00:21,300
The important part is the parameters.

6
00:00:21,330 --> 00:00:25,830
In the parameters we have statement and the parameters attribute in these statements.

7
00:00:25,860 --> 00:00:33,930
As you can see that we can use SQL scripts like insert into passing to our dynamic DB table and putting

8
00:00:33,930 --> 00:00:37,310
the values for the ID primary key product name as an attribute.

9
00:00:37,320 --> 00:00:39,810
So these are the values for the ID.

10
00:00:39,810 --> 00:00:43,890
We are inserting any partition ID, which is three.

11
00:00:43,920 --> 00:00:50,630
If you already have a three ID in your table, this will be returned back to the duplicate exception.

12
00:00:50,640 --> 00:00:55,320
But since we are creating a native ID, we don't have any exception.

13
00:00:55,320 --> 00:00:59,340
And this is the string of the new product name.

14
00:00:59,590 --> 00:01:00,180
Okay.

15
00:01:00,210 --> 00:01:06,420
In order to run this file, we can open our command window and run the note.

16
00:01:07,450 --> 00:01:08,980
Article put item.

17
00:01:09,070 --> 00:01:11,590
So hit the enter and see what's happened.

18
00:01:11,620 --> 00:01:16,830
See that this is successfully created new item on dynamic TV.

19
00:01:16,840 --> 00:01:22,780
In order to verify that, come to dynamic IMDB and run the scan command and see that the new item is

20
00:01:22,780 --> 00:01:24,670
located in our dynamic DB table.
