Member-only story

How to use PartiQL with DynamoDB in Node.js

A primer to get you going without needing to bash your head against the AWS documentation.

Marco Lüthy
10 min readSep 28, 2021
Man looking through books in a large library with many stacks of books
He’s trying to find something in the AWS documentation. Photo by Fahrul Azmi. Thank you, Fahrul!

In this article I’ll take you on a quick tour of PartiQL, showing you how to use PartiQL to query DynamoDB with Node.js. PartiQL is an SQL-compatible query language we can use to interact with our DynamoDB tables. The article aims to be a quick primer to get you going without needing to bang your head against the AWS documentation — which, as you’d expect, is less than amazing. I will assume that you’re at least somewhat familiar with DynamoDB and SQL, and have heard about PartiQL.

The article is broken down into the following sections:

  1. Setup
  2. Inserts
  3. Inserts: Insert Many / Bulk Insert / Batch Insert
  4. Selects
  5. Selects: Returning only specified attributes
  6. Selects: Unmarshalling DynamoDB Records
  7. Selects: Using a logical operator (AND, OR, IN, BETWEEN, etc.)
  8. Selects: Combining a function and an operator
  9. Selects: Parameterized function and logical operator
  10. Selects: Selecting from a Local or Global Secondary Index (LSI or GSI)

--

--

Marco Lüthy
Marco Lüthy

Written by Marco Lüthy

Hi there! I’m Marco. I write mostly about software development, sometimes about books I’ve read, and occasionally something else to keep things interesting.

No responses yet

Write a response