Use when content is about querying or scanning Amazon DynamoDB managed database.
Questions tagged [dynamodb-queries]
1232 questions
4
votes
1 answer
Dynamodb BETWEEN operation for strings
I cannot find any detailed documentation for dynamodb BETWEEN operator especially how it deals with strings.
For example if I make queries like "... sort_key Between '100' and '150' " and sort key is "120" then it works correct.
But if I make…

Kirimaks
- 41
- 1
- 6
4
votes
1 answer
Streams with initial state
I would like to expose something like a subscription or a "sticky query": the goal is to query DynamoDB and return the results via the WebSockets API in API Gateway. Well, whenever DynamoDB changes in a way the query would be affected (I guess I…

Dunken
- 8,481
- 7
- 54
- 87
4
votes
1 answer
Numeric limit & offset based pagination in DynamoDB (Java)
I want to implement numeric limit and offset based pagination in DynamoDB similar to Postgres.
My API look something like this: http://foo.bar/user?offset=50&limit=20.
What's the best way to do this in Java without risking OutOfMemoryError…

gerrytan
- 40,313
- 9
- 84
- 99
4
votes
1 answer
DynamoDB hierarchical data and condition table design
I'm having problems designing my DynamoDB table to support a fairly simple access pattern. I hope you can help me a little bit :)
I have 4 different products types (A, B, C and D) that have a price and a location (country#state#city).
The access…

user1204395
- 568
- 1
- 4
- 16
4
votes
1 answer
How to write DynamoDB query filter using AND & OR?
I have a User table, and I want to fetch data using the following query, for education purposes, I'm using a SQL-like query.
SELECT * FROM User
WHERE (gender = "Male")
AND (age between 25-30 OR height between 5.4-5.9 OR city="India, US")
I'm trying…

Nasreen Ustad
- 1,564
- 1
- 19
- 24
4
votes
2 answers
Query a Secondary Index on DynamoDB in Golang
My primary key is a field called "id"
I've added a secondary index to my table on the field "group_number"
I query via the secondary index like so:
// Query the secondary index
queryInput := &dynamodb.QueryInput{
TableName:…

user1053263
- 722
- 2
- 16
- 33
4
votes
1 answer
DynamoDB scan on seconday index (GSI)
I was reading the documentation on Scan and it prefaces with:
The Scan operation returns one or more items and item attributes by accessing every item in a table or a secondary index.1
It made me wonder, under what circumstances would scanning a…

aaa90210
- 11,295
- 13
- 51
- 88
4
votes
1 answer
Can we avoid scan in dynamodb
I am new the noSQL data modelling so please excuse me if my question is trivial. One advise I found in dynamodb is always supply 'PartitionId' while querying otherwise, it will scan the whole table. But there could be cases where we need listing our…

Pragmatic
- 3,093
- 4
- 33
- 62
4
votes
2 answers
how to query array of primary key values in dynamodb
I have one table in AWS Dynamodb with 1 million records.is it possible to query array of primary key values in one query with additional sort key condition in dynamodb?I am using for my server side logic.
Here is the params
var params = {
TableName:…

Test Mail
- 169
- 3
- 15
4
votes
3 answers
How to Scan DynamoDB for a text inside a list?
In DynamoDB i have a table with the following structure.
The actions "field" contains all the info (and this is the field i would like to search into) and orderId it's the primary key
{
"actions": [
{
"actionDescription":…

tsompanis
- 324
- 1
- 3
- 15
4
votes
2 answers
DynamoDB and Boto3 error on BatchGetItem operation: "The provided key element does not match the schema"
I am having difficulty with the Boto3/DynamoDB BatchGetItem operation. I would greatly appreciate any help or guidance! I'm pretty new to python/aws so sorry in advanced if this is a novice question.
When I perform the operation, I get this error:…

Henry Elvis Miller
- 121
- 3
- 7
4
votes
2 answers
How to filter by elements in an array (or nested object) in DynamoDB
My data is as follows:
[
{
orgId: "ABC",
categories: [
"music",
"dance"
]
},
{
orgId: "XYZ",
categories: [
"math",
"science",
"art"
]
},
...
]
I have the primary key on orgId, and I…

peter bray
- 1,325
- 1
- 12
- 22
3
votes
0 answers
How can I read data that saved in Dynamodb with ConvertToMap function?
I was using dynamodbattribute.ConvertToMap(item) function to save items in dynamodb. But later ConvertToMap deprecated and I started to use dynamodbattribute.MarshalMap(item) function. But I can not get items from db which are saved with…

levniko
- 91
- 7
3
votes
1 answer
DynamoDb Invalid ConditionExpression due to : present in expression
I want to do conditional putItem call into DynamoDb i.e. don't insert an entry in dynamoDb if the primaryKey(partitionKey + Sort Key already exists). My schema's key look like this:
PartitionKey: abc:def
SortKey:abc:123
To do a conditional I do…

Adi
- 387
- 3
- 6
- 14
3
votes
0 answers
In Dynamodb my data is coming continousaly in every 30sec but there is possible data is not coming for 1 hour and some time and then gain start coming
I want to retrieve the data for some interval(ex- 7 days) time in that interval there is possible data has come for 5day and for two days data is not coming and again data start coming from the 8th day onward ...
I am trying to retrieve between some…

Pankaj Verma
- 31
- 2