Your Web News in One Place

Help Webnuz

Referal links:

Sign up for GreenGeeks web hosting
June 14, 2021 05:00 am GMT

Introducing PartiQL For DynamoDB

AWS DynamoDB is a fully managed NoSQL database. I have been working with it for couple of years. One of the frustrating thing with it is that it did not have SQL statement-like capability to interact with tables, not until now.

In late 2019, AWS introduced a query language called PartiQL. And recently it was announced that DynamoDB will now support PartiQL. The PartiQL editor option is currently only available in the new DynamoDB console. If you want to use it, you will need to switch from the old console.

option

PartiQL is a SQL-compatible query language that makes it easy to efficiently query data in DynamoDB using DML statements select, insert, update, and delete. This is huge for DynamoDB users because of the following reasons:

  1. You can use well-known language to start using DynamoDB. You don't need to know DynamoDB query language.
  2. You now have a choice on how you choose to interact with DynamoDB. You can use PartiQL if you don't like to deal with FilterExpressions.

Here are some example of using PartiQL to query DynamoDB table.

1: For given id, return item detail.

SELECT * FROM "rssfeed" WHERE "id" = 'https://www.centralbanking.com/central-banks/monetary-policy/communication/4391106/powell-treads-cautious-line-in-jackson-hole-remarks' and guidislink=false`

Full detail

2: For given id, only return summary and title information

SELECT summary, title FROM "rssfeed" WHERE "id" = 'https://www.centralbanking.com/central-banks/monetary-policy/communication/4391106/powell-treads-cautious-line-in-jackson-hole-remarks' and guidislink=false

Selected fields

Keep in mind that internally the SELECT SQL statement will be converted to Scan or Query operation depending on the WHERE clause.

I have a feeling in the future PartiQL will address my other frustration with DynamoDB. That is you can not delete all the items in the table without needing to drop & recreating the table. This can be a time-consuming activity.

For now, I am just happy to have PartiQL in my arsenal when working with DynamoDB.

References
  1. PartiQL
  2. PartiQL AWS Annoucement
  3. PartiQL AWS Developer Guide

Thanks for reading!

If you enjoyed this article feel free to share on social media

Say Hello on: Linkedin | Twitter

Github repo: hseera


Original Link: https://dev.to/aws-builders/introducing-partiql-option-for-dynamodb-1j9g

Share this article:    Share on Facebook
View Full Article

Dev To

An online community for sharing and discovering great ideas, having debates, and making friends

More About this Source Visit Dev To