Use when content is about querying or scanning Amazon DynamoDB managed database.
Questions tagged [dynamodb-queries]
1232 questions
4
votes
1 answer
Dynamodb.ScanInput - Cannot use 'expr.Names()' (type map[string]*string) as the type map[string]string
I need to scan my table in dynamodb using filtering. I found many examples in internet but when I try use them I have the same error all the time.
filter := expression.Name("CreatedDate").LessThan(expression.Value(time.Now().UTC()))
expr, err :=…

BElluu
- 381
- 5
- 14
4
votes
1 answer
Can not use both expression and non-expression parameters in the same request
Basically, I have a table with two indexes that I'm trying to query and filter.
The querying part works for the Table and the index but the problem happens when I try to filter:
ValidationException: Can not use both expression and non-expression…

user3812411
- 342
- 3
- 17
4
votes
1 answer
DynamoDB ExclusiveStartKey error The provided starting key is invalid
Well hello fellas, i'm starting in dynamodb and i have some missunders when i want to use the ExclusiveStartKey.currently im working with the GSI and heres is how i have the params for the query
{
TableName: 'Search',
IndexName: 'GSI1',
…

Adal Zayas
- 43
- 1
- 3
4
votes
1 answer
What is the difference between PaginatedQueryList and QueryResultPage in DynamoDB?
I am currently working with DynamoDB with Java and using DynamoDBMapper. I saw that when we use DynamoDBQueryExpression we can use either PaginatedQueryList or QueryResultPage. If we are using any of them below are the methods we have to use,
query…

H Athukorala
- 739
- 11
- 32
4
votes
0 answers
Dynamo DB Projecting additional attributes in existing GSI having billions of data
I have a dynamo db table having almost a billion records in it. It has 4 different GSI. I need to project few more attributes to one of the GSI. What is the best approach to do so?
I thought two options:
Delete the GSI where I want to project…

Jacob
- 420
- 5
- 15
4
votes
1 answer
DynamoDB how to use sort key with PartiQL query?
Hello I m new to DynamoDB, I have created a TABLE, with Partition Key "pk" and Sort Key "id"
in then item explorer I can query with the pk and sort key value and it seems to work.
In the PartiQL Editor I do
SELECT * FROM "dev" WHERE "pk" = 'config'…

fred_
- 1,486
- 1
- 19
- 31
4
votes
1 answer
AWS BatchGetItem vs GetItem in parallel
Is there much difference (in time performance) in using BatchGetItem vs issuing several GetItem in parallel?
My code will be cleaner if I can use GetItem and just handle the parallelisation myself.
However, if there's a definite time performance…

Lawrence Wagerfield
- 6,471
- 5
- 42
- 84
4
votes
0 answers
AWS dynamoDB / Update / UpdateExpression / How to get around the paths overlap restrictions by working with nested maps?
I want to update dynamoDB items with nested maps in where I don't know if the items does already exist or not. If it already exist it's all good. But if the item does not exist yet I get an error. I don't have the option to create those "empty"…

MJey
- 345
- 3
- 16
4
votes
1 answer
DynamoDB query without sort key
I have a DynamoDB table that contains primary key : userID, sort key : sessionID and another column which is named examID.
i would like to return a list that returns all records that have the userID and examID sent by me.
Here is my code:
export…

Etika49
- 680
- 1
- 8
- 16
4
votes
1 answer
DynamoDB Limit on query
I have a doubt about Limit on query/scans on DynamoDB.
My table has 1000 records, and the query on all of them return 50 values, but if I put a Limit of 5, that doesn't mean that the query will return the first 5 values, it just say that query for 5…

pmiranda
- 7,602
- 14
- 72
- 155
4
votes
3 answers
Should I make this field a GSI, a regular attribute, or something else in order to have efficient queries?
For my DynamoDB table, I currently have a schema like this:
Partition key - Unique ID, so every item has a completely unique ID
Sort key - none
Attribute - JSON that contains some values
Now, I want to add a new field that will be required for every…

EMS
- 71
- 3
4
votes
2 answers
How to update items based on just the partition key?
Our table has a composite primary key. There are a few use cases where we need to update the items based on just the partition key.
partitionKey sortKey
------------ ---------
10020525 208025117-xxxxx-153068323-208025401
10020525 …

miserable
- 697
- 1
- 12
- 31
4
votes
1 answer
DynamoDB: Get All Sort Keys from Primary Key
I have a table with a primary key and a sort key; since this is a composite key, I have multiple primary keys mapped with different sort keys.
How can I get all of the sort keys associated with a particular primary key?
I tried using the "Get"…

zpChris
- 98
- 1
- 8
4
votes
2 answers
DynamoDB how to get items count for a partition keys using .net core?
How can I get items count for a particular partition key using .net core preferably using Object Persistence Interface or Document Interfaces?
Since I do not see any docs any where, currently I get the number of items count by retrieve all the item…

HExit
- 696
- 7
- 17
4
votes
0 answers
DynamoDb querying with geo-spatial data (Local Secondary Index) AND foreign keys saved as range key
I'm trying to construct a DynamoDb table supporting these 3 access patterns:
Access list of institutions within XX radius of a given zip code.
Access list of institutions within XX radius of a given zip code for a given education level (4-year,…

Tom Schreck
- 5,177
- 12
- 68
- 122