All Projects → trek10inc → Ddb Single Table Example

trek10inc / Ddb Single Table Example

Programming Languages

python
139335 projects - #7 most used programming language

DynamoDB Single Table Example

The code in this repository uses the Northwind dataset to demonstrate simple relational modeling in a single DynamoDB table. For a full walkthrough of the underlying rationale, see the accompanying blog post.

Using the code

Run python load.py --setup with valid AWS credentials in your environment to perform the following actions:

  • Create a new DynamoDB table called northwind in us-east-2
  • Create one GSI on the table
  • Load the files in the csv folder into the table according to the data access patterns defined in the blog post that accompanies this project

The table has on-demand capacity enabled, so you shouldn't have to worry about the writes being throttled (or about being charged for capcity when you're not using the table)

If you need to reload the data, run python load.py.

Clean up with python load.py --teardown.

You can find sample boto3 queries against the data defined in query.py.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].