Questions tagged [dynamodb-queries]

Use when content is about querying or scanning Amazon DynamoDB managed database.

1232 questions
3
votes
0 answers

How to filter data by an object in array in DynamoDb

I want to filter data using dynamoDB QueryInput approach, the problem is in filtering data with an object in Array. I have a data with below structure [ { "Pk": "mimzeslami@gmail.com", "Sk": "social-shared-goal-2022-09-27…
3
votes
1 answer

Can we update DynamoDB GSI partition key?

According to the docs, I understand PrimaryKey PK & SortKey SK can't be updated on the main table. However this is not clear for GlobalSecondaryIndex (GSI) and it seems to be ok to update GSI SK (correct me if I'm wrong). Suppose I had the…
derng
  • 33
  • 1
  • 3
3
votes
0 answers

withKeyConditionExpression in DynamoDB enhanced version

All - I'm trying to migrate dynamodbclient from v1 to enhancedclient and I'm unable to figure out how I can convert this below line. In V1 : queryExpression.withKeyConditionExpression("country = :country and state =…
Jughead1217
  • 63
  • 1
  • 10
3
votes
1 answer

Does the IN PartiQL operator query or scan DynamoDB tables?

We need to query a large (2TB+) DynamoDB table to get multiple items based on their partition keys. We are planning to use PartiQL as it supports the IN operator as such: SELECT * FROM table_test where pk IN ('1234','1112'); Would this query do…
mariz
  • 509
  • 1
  • 7
  • 13
3
votes
1 answer

How do I extract Map type-attributes from DynamoDB item using .NET

I have successfully queried a DynamoDB dataset and returned the last item associated with the primary key. The item data consists of the following: `{ "machineID": { "N": "1322" }, "ts": { "N": "1646299793339" }, "data": { "M": { …
3
votes
1 answer

Dynamodb what are WCU and RCU?

Even after reading many articles, I'm still unable to understand what WCU and RCU mean. Dynamo offers the following FREE tier: 25 provisioned Write Capacity Units (WCU) 25 provisioned Read Capacity Units (RCU) What does "25 reads and writes per…
Bazinga
  • 10,716
  • 6
  • 38
  • 63
3
votes
0 answers

DynamoDB Filter Expression with nested JSON

I am trying to fetch items, which satisfies certain conditions, from dynamodb Here is the Item JSON structure. { "userID": "3201054407a58", "createdDate": 1643769000000, "modifiedDate": 1643769000000, "attributes": { "zipCode": "683562", …
Jacob Nelson
  • 2,370
  • 23
  • 35
3
votes
1 answer

ValidationException: Query condition missed key schema element: company'

Query that searches the db for a type 'Company' with the 'Country' field as passed in as an argument, and returns this Company object. export const companyQuery = async (country: string): Promise => { const queryParams:…
3
votes
1 answer

@aws/dynamodb-data-mapper: How to write ConditionExpression in QueryOptions filter area?

I would like to fetch data from DynamoDB database by using [AWS-DynamoDB-Data-Mapper][1]. I am using QueryIterator and to provide indexName, limit, filter purpose, I am using [QueryOptions][2]. In QueryOptions, I would like to use filter?:…
3
votes
1 answer

i was getting this error "not supported; requires @DynamoDBTyped or @DynamoDBTypeConverted" when i tried to run the below code

when i tried to run the code using put on this entity. i was getting the error as @DynamoDBTyped or @DynamoDBTypeConverted but i can retrieve the data from the databse using get and delete without any issue, i think the issue is something with the…
3
votes
3 answers

Filter nested array using projection without using unwind

I have my collection1 which holds the _ids of collection2 in projects field as follows: { "name": "adafd", "employeeId": "employeeId", "locations": [ "ObjectId(adfaldjf)", "ObjectId(adfaldjf)", …
3
votes
2 answers

How to Access data from Dynamo db tables in react native using aws-amplify

I am using aws-amplify in my react-native application for user authentication. it works fine. modules used for aws amplify aws-amplify: "^3.0.23", aws-amplify-react-native: "^4.2.4" Now I would like to connect the app or retrieve the data from a…
3
votes
1 answer

Is it possible to generate a BETWEEN query on a DynamoDB Global Secondary Index using an exclusive endpoint?

By default, the endpoints of a BETWEEN query are inclusive. I want to query for a range of datetimes using an exclusive endpoint. I'm currently using pynamo, so my query is: Item.my_index.query( hash_key=hash_key_id, …
Ben
  • 380
  • 1
  • 9
3
votes
1 answer

Querying by multiple attributes in dynamo db

Hi guys im new to dynamodb and im building a currency exchange matching platform and i wanted to know how to query multiple items using dynamo Use case: order model: { id: SELLorBUY#someid, quote_cur: 'GBP', base_cur: 'USD', rate: 2.00, side:…
user13468285
3
votes
1 answer

dynamodb keyconditionexpression vs filterexpression costs?

I would like to know if there are costs diference when i make a query in dynamodb and use a filterexpression instead of a keyconditionexpression. Do i need to create indexes to use filterexpressions ? Do it increase the costs of queries ?
madruga
  • 104
  • 1
  • 8