Open In App

AWS DynamoDB – PartiQL Insert Statement

PartiQL is a SQL-compatible query language that supports querying, modifying, and inserting data. It makes it easier to interact with DynamoDB and run queries in AWS Management Console.

Insert data into DynamoDB Table using PartiQL:

Syntax:



INSERT INTO table-name VALUE item;

Example:

INSERT INTO Books VALUE 
{
'bookId':  1,
'bookName': ‘Book Name’,
'bookAuthor': ‘Book Author’,
'quantity': 20  
};

Using PartiQL in AWS Management Console:

Pre – Requisites: 



  1. AWS Account
  2. DynamoDB table

Implementation:

Step 1: Login into your AWS account. Search for “DynamoDB” which will be present under “Services”, select it.

Step 2: Once you are directed to the DynamoDB Management Console, on the left side there is PartiQL editor, select it.

Step 3: After you are directed to the PartiQL editor, Select the table that you want to insert data into.  

Step 4: Type the Query in the editor and click on run, it should be executed successfully.

Step 5: The data gets inserted into the table, and the insert operation is completed.

Article Tags :