dynamodb-toolbox | simple set of tools for working with Amazon DynamoDB | Object-Relational Mapping library
kandi X-RAY | dynamodb-toolbox Summary
kandi X-RAY | dynamodb-toolbox Summary
A simple set of tools for working with Amazon DynamoDB and the DocumentClient
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of dynamodb-toolbox
dynamodb-toolbox Key Features
dynamodb-toolbox Examples and Code Snippets
Community Discussions
Trending Discussions on dynamodb-toolbox
QUESTION
I've got a question regarding GSI. The question is quite easy for people who are working with DynamoDB :)
Currently, I'm learning about AWS/DynamoDB with creating a blog. So each post got one category. I got one big problem that if I want to get all posts which got a special category. Now I'm using a scan and contains a filter.
EDIT: To create models I'm using 'dynamodb-toolbox'
I heard that I can apply a GSI and get all posts with category by searching with GSI. The biggest problem is... I do not know how can I create GSI, how can I use it in query width DocumentClient and node.js
Thank you for your help!
...ANSWER
Answered 2020-May-09 at 17:40I do not know how can I create GSI
This is on the documentation, more specifically available here.
I got one big problem that if I want to get all posts which got a special category. Now I'm using a scan and contains a filter.
In this case and based on your data model currently, you need to configure a GSI with category
being the partition key and id
being the sort key, where you need to configure the primary key as being the composite primary key of PK and SK, as described here.
This will allow you to query the data by category on that GSI, as you have the category as the partition key, you will hit one partition when you perform your query.
how can I use it in query width DocumentClient and node.js
I suggest that you figure these out first, and make it work in isolation w/o worrying about your programming language constraints. Once you get a handle of this, you can worry about programming language challenges in isolation.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install dynamodb-toolbox
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page