Use Terminal to aggregate, filter and modify DynamoDB using code
Open DynamoDB Table and click 'Terminal' button next to 'Favorite'. A small editor below the filtering section will appear.
Code. Now it's entirely up to you. Filter, map, reduce, or even perform data modifications using Javascript and 3rd party SDKs like Fetch or DynamoDB. Transform function lets you do with the DynamoDB data whatever you like.
Click 'Run'. You'll see data modified by your code.
Frequently Asked Questions
Why is this feature so important?
DynamoDB filtering capabilities are limited. With Terminal, you can slice and dice DynamoDB data, however, you like using well-known Javascript. Moreover, it lets you write scripts that would asynchronously modify data in the table just like using SQL.
What are the example use cases?
- Filter data using Regexp and perform validations
- Calculate some statistical value from the dataset and return items only bigger than it
- Create migration scripts (Update X where Y)
- Connect to 3rd party APIs using Fetch to validate or enrich the data
How can I use it?
Write your own 'transform' function. It will be invoked once you click 'Run'. It accepts the 'data' argument, which is payload from DynamoDB and returns an Array, which is going to be rendered below.
Can I write asynchronous code?
Yes! Dynobase Terminal supports Promises and async/await syntax.
Can I use a script I have written outside of Dynobase context?
Yes! You can click 'Export As...'. It will save a complete Node.js based script that could be executed outside of Dynobase context, e.g. in CI/CD or in your local Terminal.