@oscar-bartman/dynamodb-export-csv

0.0.12 • Public • Published

JavaScript Style Guide

dynamodb-export-csv

Tool that downloads a dynamodb table export stored in s3 as csv files.

Usage

Set the following variables through env:

name description example required
AWS_ACCESS_KEY_ID your aws access key id ... yes
AWS_SECRET_ACCESS_KEY you aws access key ... yes
AWS_REGION your aws region ... yes
EXPORT_BUCKET name of the bucket that you stored your export in. arn:... yes

Download the export as csv. Specify which fields in the data you want under which header name.

$ export EXPORT_ARN = arn:aws:dynamodb:...
$ dynamodb-export-csv $EXPORT_ARN 'key=id,key=contact.email&header=email'

Outputs:

0.csv, 1.csv, ..., x.csv, arns.log

Using filters

You can pass filters by specifying which field you want to filter on and which value it should have. Currently only equals filters are supported:

$ dynamodb-export-csv $EXPORT_ARN 'key=id,key=contact.email&header=email' 'preferences.favoriteColor' 'BLUE'

Specifying which field to filter on is done via object-path so any of the object query syntax defined therein should work.

Development

Run tests

npm t

Debug this code

$ node --inspect-brk src/index.js

Readme

Keywords

Package Sidebar

Install

npm i @oscar-bartman/dynamodb-export-csv

Weekly Downloads

2

Version

0.0.12

License

ISC

Unpacked Size

8.56 kB

Total Files

10

Last publish

Collaborators

  • oscar-bartman