Questions tagged [amazon-dynamodb-index]
251 questions
0
votes
1 answer
Query composite index query in Dynamo
I have a DynamoDB table with following keys:
id: partition key
created_at: sort key
brand#category#size#color: partition key for global index 'byAttributes'
The global index partition key is a composite of 4 table attributes using '#' as a…

good1492
- 161
- 1
- 10
0
votes
1 answer
DynamoDB table setup GSI vs composite sort-key
I'm new about DynamoDB and I'm trying to understand some aspects. I have a doubt.
Suppose that I have to store these info related to a Book table:
book_id: UUID primary key;
author_id: UUID
type: String
Additional multiple attributes
I need to…

Safari
- 11,437
- 24
- 91
- 191
0
votes
1 answer
DynamoDbException: No Hash Key specified in schema. All Dynamo DB tables must have exactly one hash key
It is possible with DynamoDB to create a global secondary index only with a RANGE key without a HASH key? If yes, how?
If no, can I update an item attribute that is used in a global secondary index HASH key?
Background: I have only 100 - 1000 items…

Horcrux7
- 23,758
- 21
- 98
- 156
0
votes
1 answer
How can I get a list of partition keys from a DynamoDB table?
I am using java (dynamodb mapper) to make CRUD operations on a DynamoDB table with composite primary key (partition key and sort key).
I would like to make modifications to attributes partion-by-partion. How can I get a list of all the unique…

shoumik
- 11
- 2
0
votes
0 answers
How many key is maximum in declare model schema in amplify?
i have model and declare @key but i don't know maximum declare index in model
@key(name: "byGuest", fields: ["guestId"], queryField: "listItemByGuest")
@key(name: "byName", fields: ["name", "createdAt"], queryField: "listItemByName")
@key(name:…

Nguyễn Văn Phóng
- 194
- 6
0
votes
1 answer
Dynamodb date between query not working on GSI key
I have a users table, where the Partition Key is only ID and I added a GSI on createdDate. The format of createdDate is YYYY-MM-DD. I have 2 requirements, get the user only by ID & query the users by the date range. Both queries are separate.
Now…

nick
- 109
- 7
0
votes
0 answers
DynamoDB: Why would I be limited by the number of partition-id?
If I've got a students and skills data, where there is already a table with student information and I want to save this many to many relationship in a new record, what would be the best PK and SK?
I tried to save:
PK: skill id
SK: studentId
but I…

S.Dan
- 1,826
- 5
- 28
- 55
0
votes
0 answers
NoSQL Data Storage + K-V Cache
I am building a system stores the promotion activities and bunch of promotion meta data.
At the beginning, the data looks like:
promotion_name, promotion_content, promotion_location.
And I will query the data with promotion_name +…

Jonathan
- 1
- 1
0
votes
0 answers
Why querying with ORDER BY fails in DynamoDb?
I have a query where I ORDER BY expected_delivery value which is a number (UNIX timestamp) but it fails with this error:
ValidationException: Must have at least one non-optional hash key condition in WHERE clause when using ORDER BY clause.
Here…

showtime
- 1
- 1
- 17
- 48
0
votes
1 answer
How to create composite GSI PK in DynamoDB?
I have tried creating GSI with a PK that uses a composite value of business_id, type_id, partner_id fields. I did it in two different ways in the AWS console:
First: business_id#type_id#partner_id
Second: [business_id]#[type_id]#[partner_id]
and…

showtime
- 1
- 1
- 17
- 48
0
votes
1 answer
How to model many to many relationship in dynamoDB
I have a user object that looks like this:
UserId: UUID;
Watching: Card[];
Stocks: Stock [];
Listing: Card[];
And then I have a Card object that looks like this:
CardId: UUID;
UserId: UUID;
… other card attributes i.e name
And a stock Object that…

Oliver Darby
- 454
- 1
- 6
- 15
0
votes
1 answer
How can I design a DynamoDB table with a GSI when I need to know the unique keys?
I'm trying to design a DynamoDB table. I'm choose the keys I insert, what my partition and sort keys will be, as well as whether or not to including a GSI.
My data, for sake of example, looks like this:
Table name: person
{
uuid:…

mmachenry
- 1,773
- 3
- 22
- 38
0
votes
2 answers
Can I use `contains` in a query for DynamoDB GSI?
I am new to DynamoDB. If I make a GSI, can I do a query with KeyConditionExpression: contains (GSI, :val1) and contains(GSI, :val2)
Will it be a full scan?

Siddhant Bagga
- 23
- 5
0
votes
1 answer
DynamoDB tables's RCU/WCU is not increasing even after throttle errors
I have created a DynamoDB table with capacity mode On-demand.
I am performing a few queries on the global secondary index of the table which give me errors:
An error occurred (ThrottlingException) when calling the Query operation (reached max…

sauumum
- 1,638
- 1
- 19
- 36
0
votes
1 answer
ValidationException: Must have at least one non-optional hash key condition in WHERE clause when using ORDER BY clause
I have this query where I fetch all messages based on these conditions:
SELECT id, message, created, sender_company_id, receiver_company_id, read_msg, receiver_user_id, receiver_user_name,
sender_user_name, sender_user_id,…

showtime
- 1
- 1
- 17
- 48