Questions tagged [amazon-dynamodb-index]

251 questions
0
votes
2 answers

DynamoDB table design pattern: catagorized data with utc time stamp

I'm currently designing a DynamoDB pattern I don't know if I'm on the right track or not. I have the following data I need to store into a DynamoDB table: deviceID (number) deviceLogType (string) timestamp (number) // timestsamp is in utc…
0
votes
1 answer

How to model a 1 to N relationship to satisfy single reads and writes using Amazon DynamoDB?

I'm trying to learn proper DynamoDB modeling coming from a standard RDBMS background. The relational database I am trying to denormalise is as follows: TwoFactorDetail Id (pk) Status PhoneNumberId (fk) PhoneNumber Id…
0
votes
1 answer

How to get records from DynamoDB table based on list type attribute, without scan operation

I have the following situation, with similar to this DynamoDB table definition: { "TableName": "Table", "KeySchema": [ { "AttributeName": "Id", "KeyType": "HASH" }, { …
0
votes
1 answer

dynamodb index does not return all data

I have a table storedgames, which contains 2092 items. And it also has an index on that table, which also lists 2092 items. when I fetch data, I use the index, to obtain the items for one specific user. const params = { TableName:…
bvdb
  • 22,839
  • 10
  • 110
  • 123
0
votes
1 answer

How to get items from DynamoDb in Descending order with AWS Java SDK?

I have a table in AWS DynamoDB called accountantHistoric. It has a primary partition key (id) and a primary sort key (tenant_id). I also created another index, called "ExpirationDate". The sort key of this index is the "expirationDate"(String)…
0
votes
1 answer

Query dynamodb table by primary key

I'm having problems creating a simple query request. Here they show an example of how to do a query using the global secondary index. Now in this case, I just have the primary key, and I'd like to query from my table. This is currently the error…
0
votes
1 answer

DynamoDB index only a specific set of values

My dynamoDB index is flooding with huge data. I would like to choose values that could be indexed and avoid indexing the rest. Is this possible? Lets say, below are the sample items: parent item: { "hashKey":"a1" "indexHashKey":"parentType" …
Deepak
  • 962
  • 4
  • 17
  • 38
0
votes
2 answers

DynamoDB How to query a non-key attribute with strong consistency?

I have the following table in DynamoDB: Table: Person Attributes: person_id, firstName, lastName, age, birthday Partition Key: person_id My problem is: I need to query all the people that are between a certain age, for instance age > 18 AND age <…
0
votes
1 answer

Why the index in dynamodb be called 'secondary index' ? Why add 'secondary'?

OK! I just want to know why secondary index. Who is the first? I am from China. Maybe the problem of translation.I am just a little curious.
Oliver
  • 1
  • 4
0
votes
1 answer

AmazonDynamoDBv2 Query not recognizing GSI

My implementation of AmazonDynamoDBv2's AmazonDynamoDBAsync.queryAsync with a QueryRequest is returning a code 400 "Query condition missed key schema element ..." when I am querying on a GSI. I have tried using both the DynamoDBAttribute name…
0
votes
2 answers

Is it efficient to use multiple global indexes on a single DynamoDB table?

There exits a data-set as described in the below table. Sr.no is used in the below table only for reference |sr.no| id | tis |data-type| b.id |idType_2| var_2 | |-----|----------|-----|---------|----------|--------|--------| | 1 …
0
votes
1 answer

How to sort DynamoDB rows by an attribute

I have the following table: ItemUUID (string) | Purchases (number) | Type (string) -------------------------------------- book-a | 5 | book book-b | 1 | book book-c | 10 | book Every time someone buys an item, I would like to increment the…
0
votes
1 answer

Many-to-many relationship: Global Secondary Index vs. Adjacency list

For representing many-to-many relationship in Dynamo DB, I've commonly seen two approaches: Global Secondary Index (GSI) and Adjacency list. Now my question is, when to use which one? The use of GSI basically states to flip the partition key and…
kaskelotti
  • 4,709
  • 9
  • 45
  • 72
0
votes
2 answers

DynamoDB best practice for retrieving a large subset of data

Say I have one table with 50,000 items and the PK for each record is a unique number. Half of these items has a property "published" set to "1" and the other set to "0". Most of the time I'll be retrieving individual items using the hash key, but…
rangfu
  • 6,878
  • 2
  • 16
  • 17
0
votes
1 answer

DynamoDB Design PartitionKey, RangeKey and GSI

I'm designing a new Table over DynamoDB. I already read some documentation but I'm not able to figure out which design schema should I follow to not have problems in a future. Current Approach Table - events - eventId (HashKey) - userId -…
1 2 3
16
17