Questions tagged [partiql]

78 questions
1
vote
0 answers

Increase expiration of NextToken in DynamoDB ExecuteStatement

We have an API that reads the data from DynamoDB by using PartiQL query in ExecuteStatementWithContext function. This API is paginated and i rely on NextToken for reading all DynamoDB pages. The problem is that there is an expiry for NextToken and i…
1
vote
1 answer

DynamoDB partiql high cost compared to regular query command

I'm trying to write a dynamodb expression to filter certain things out. I've noticed that the following partiql is significantly more expensive than I thought it would be. aws dynamodb execute-statement --return-consumed-capacity INDEXES…
HSchmale
  • 1,838
  • 2
  • 21
  • 48
1
vote
1 answer

Using PartiQL with DAX for DYnamoDB

If we use only PartiQL for Dynamodb calls, do the calls get automatically routed via DAX because we are using DAX cache also in front of some of our tables. Basically how to use PartiQL along with DAX Thanks
Samar
  • 2,091
  • 1
  • 15
  • 18
1
vote
2 answers

How to use f-Literal with PartiQL in AWS and boto3

I want to use PartiQL to query a DynamoDB table with boto3. I works perfectly, when I use it like this: stmt = "SELECT * FROM Onlineshop WHERE PK= 'c#12345'" resp = dynamodb.execute_statement(Statement= stmt) But when I replace some values in the…
aerioeus
  • 1,348
  • 1
  • 16
  • 41
1
vote
1 answer

PartiQL return all rows that match a single row userId

I'm trying to run a PartiQL query in DynamoDB that will return all items in a table that match the userId of 1 item in that table. I tried running the below query, but I'm getting the following error. How can I get this to…
Simon Rex
  • 143
  • 2
  • 10
1
vote
1 answer

How to read a SUPER data-type value with multiple values sharing the same property names?

I have in my redshift database a field of the SUPER type: It contains { "Order": { "OrderNumber": "Ab1234ZX", "ReasonDelay": "No reason", "ReasonDelay": false } } The problem is that I have two attributes with the same…
Henrov
  • 1,610
  • 1
  • 24
  • 52
1
vote
1 answer

How to get most recent data from DynamoDB for each primary partition key in PartiQL

inspired from this How to get most recent data from DynamoDB for each primary partition key? I have a table in dynamodb. It stores account stats. It's possible that the account stats will be updated several times per day. So table records may look…
lowLatency
  • 5,534
  • 12
  • 44
  • 70
1
vote
0 answers

How do I query keys available for nested data in column stored as SUPER

I have a redshift table that has a column (SUPER data type) that contains nested json data that can have 1..n nests such as { key1:value1, key2:{ keya: valuea, keyb: { k1a: v1a, k2b: v2b } } } The column has a billion plus rows and many records may…
1
vote
1 answer

Amazon qldb SELECT query to search specific rows with very less READIo's

I have a table with the following columns UserID (index), SID (index), Cause (index), TimeValue (index), Amount I want to query the cause of a specific user id, Meaning I want some cause which is equal to let's say water but I want this for only one…
1
vote
1 answer

Select query on the MAP or JSON data set by using PartiQL contains in AWS

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…
Satyaki Mukherjee
  • 2,857
  • 1
  • 22
  • 26
1
vote
2 answers

Is a SQL Injection Attack Possible in QLDB/PartiQL

This question came up in a code review in reference to a select query that is necessarily constructed using string interpolation (C#) and I can't seem to find a reference one way or the other. For example, a query might look something like: var sql…
1
vote
1 answer

How to use IN statement in partiqL DynamodB

I want to convert this query select lKey from KeyMapping where gKey in ['A#1','A#2','A#3']; I have a List that contain A#1, A#2 and A#3 into Java code to extract records from DynamoDB using PartiQL
Innovation
  • 1,514
  • 17
  • 32
1
vote
1 answer

Current time in PartiQL query

How can I get the current time in a PartiQL query? The obvious answer of using the SQL NOW() function is not supported: PartiQL> SELECT NOW() FROM data; org.partiql.lang.eval.EvaluationException: No such function: now Evaluator Error: at line 1,…
NeilenMarais
  • 2,949
  • 1
  • 25
  • 23
0
votes
1 answer

PartiQL DynamoDB IN statement implementation

I am wondering about the underlying PartiQL implementation of the SELECT ... WHERE PrimaryKey IN statement with respect to its performance in DynamoDB. Example: SELECT * FROM Table WHERE PK IN [1, 2, 3] Given that the lower-level Query API - Key…
0
votes
0 answers

Redshift join on "SUPER" type array

I have a SUPER column that contains an object with array. {"list":["MY","ID","SG","TW","KR","CN"]} Would like to join tables on that array. Had hoped that this would be simple and work in the same way one would join to pg_group myfield =…
SimonB
  • 962
  • 1
  • 14
  • 36