Questions tagged [documentclient]

The document client simplifies working with items in Amazon DynamoDB by abstracting away the notion of attribute values

The document client simplifies working with items in Amazon DynamoDB by abstracting away the notion of attribute values

45 questions
0
votes
1 answer

dynamodb doc client forcing a put (not update) into a table

I am trying to make a put into a dynamo table I created called events using the aws-sdk for javascript, in particular AWS.DynamoDB.DocClient(). It was set up to simply track any and all user events and is a super simple structure. The structure is…
0
votes
1 answer

AWS DynamoDB DocumentClient query error - One or more parameter values were invalid: Condition parameter type does not match schema type

I have an AWS DynamoDb table called AccountXX which stores items with a JSON structure as: { "id": "some id value", // also the partition key for the table "name": "a name", "email": "an email address", "salt": [12, 3, ... ], // an array of…
vvg
  • 1,010
  • 7
  • 25
0
votes
2 answers

Query DynamoDB with Two Matching Fileds

I am new into DynamoDB. I am trying to query a collection with two matching field. I have written a code in mongoDB, I am trying to migrate to DocumentDB. I am facing issue. MongoDB Code This works well getUser= async(req,res)=>{ let user = await…
0
votes
1 answer

Writing to DynamoDB from Lambda Function

Setup: I am trying to setup an Lambda function that is triggered by Web Sockets coming in from API Gateway and also an SNS topic that it is subscribed to. Based on the event passed in, I make the determination about which service initiated the call…
JakeHova
  • 1,189
  • 2
  • 15
  • 36
0
votes
2 answers

How to write the parameter to update a particular property's value in an object from an array?

How to update quantity value based on title in the movies array and Item id (123) I only manage to update value at the first layer like name (David), but don't know how to update the second layer with additional filter for the array…
Albert
  • 11
  • 3
0
votes
1 answer

The batchWrite method of DocumentClient and GSI

I'm trying to delete some items from DynamoDB table. My table has a global secondary index. And I'm wondering if it's possible to use the batchWrite method of the DocumentClient to delete items from GSI table. Or we can use GSI for fetching data…
0
votes
0 answers

DocumentClient query returns invalid KeyConditionExpression: An expression attribute value used in expression is not defined

I am trying to query my dynamodb table for a specific partition_key in which the sort key begins with "REFRESHTOKEN_". I am using DocumentClient query operation for this. When ran, I get the following error message that the expression attribute…
Justin Yapp
  • 89
  • 1
  • 6
0
votes
1 answer

Lowercase document in CosmosDB

I am trying to store a document in lowercase (both property name and value) in the CosmosDB. I just want to make it on the DocumentClient level. I found the below code to apply JsonSerializerSettings while creating the client object. But this will…
0
votes
1 answer

DocumentClient.CreateDocumentQuery throws a "not an instance" error when running a query

I'm writing a .NET web service that takes documents from a cosmosDB database. I writing a function in another project (that is supposed to be as generic as possible) to retrieve a document, so that the WS will use it. I'm using DocumentClients…
Nexaspx
  • 371
  • 4
  • 20
0
votes
0 answers

Unable to read data from the transport connection: Operation canceled. Operation canceled

I am trying to read data from a cosmos collection using DocumentClient, while trying to read, sometimes I am getting the following error. Code: var Client = new DocumentClient(new Uri(accountUri), accountKey); var collectionLink =…
0
votes
2 answers

DocumentDb DocumentClient get first 25 documents

Getting started with Cosmos and document db/sql. Why does this not work? No error is thrown, that I can see. There is data that should return. private const string EndpointUri = "some url"; private const string PrimaryKey = "somekey"; …
0
votes
0 answers

Dynamo DB query using index which is not primary key

I have a Dynamo DB table which has a primary key as well as a secondary index (routeId). I need to retrieve records containing the secondary index. However, I need to get results for multiple routeId values in a single run. Any way to do it?
0
votes
0 answers

CosmosDB - trouble getting database object

I have a CosmosDB database with one collection. If I go on Azure portal to the CosmosDB section, and then to the entity explorer, I can see the database name. If I put that database name in this code (client is a…
JakeJ
  • 2,361
  • 5
  • 23
  • 35
-1
votes
1 answer

Error 'query key condition not supported' while performing a query with secondary index but without partition key

I need to get ALL the data (a large amount) from the past two months from a table in DynamoDB. As I don't need in this case the partition key in the condition, and Scan doesn't retrieve all the data, I've read that it's possible (if I'm not…
Agostina
  • 29
  • 1
  • 3
-1
votes
1 answer

What type should i pass in ExpressionAttributeValues for a sort key of type integer to query in dynamodb?

According to dynamodb documentation, we need to add type of a number as string. Refer image- but this throws an error of 'ValidationException: One or more parameter values were invalid: Condition parameter type does not match schema type' if we pass…
kev
  • 79
  • 1
  • 1
1 2
3