1

I would like to fetch results from AWS DynamoDB by using PartiQL. I am able to fetch the data for normal items. I am using this code -

const statement = `SELECT * FROM "dbname.int"  WHERE contains("item3", '{"accountName": 'val2'}')`;
const results = await db.executeStatement({Statement: statement}).promise();

DynamoDB structure - item1(String type) -> 'some value' item1(Number type) -> 0 item3(MAP type) -> '{"accountName": "Dummy Name", "city": "Delhi", "info":{"info1": "info val"}'

I am looking for accountName value which contains 'Dummy' text.

Satyaki Mukherjee
  • 2,857
  • 1
  • 22
  • 26

1 Answers1

0
SELECT * FROM "dbname.int"  WHERE contains(item3.accountName, 'val2')