DynamoDB to CSV is not as easy as it sounds – but can be crunched in a couple of commands. During the Komodo blockchain scaling stuff we’re doing, in a simple scaled down run of about 1k tx/s we ended up with 40k items in a DynamoDB table. To convert to csv, I did these commands using jq
aws dynamodb scan --table-name kmd-blocknotify-blackjok3r-1-v0 > result.json jq ".Items | [ .ac.S, .height.N, .totaltx.N, .size.N, .time.N, .mempoolMB.N, .mempooltx.N] | @csv" result.json | sed 's/"//g' | sed 's/\\//g' > result.csv
Then to sort by a particular column
cat result.csv | sort --field-separator=',' --key=5 > sorted.csv
Easy to handle in a spreadsheet now 🙂
at the moment i contribute to the komodo platform where we believe in lowering the barrier to blockchain adoption through an ethos of openness, interoperability and freedom.
hopefully these bits find an appreciative person enlightening themselves with the skills and tools to get stuff done. i love not working, but if there’s pioneering or (re)imagination involved i enjoy working with good people possessing prosperous intentions and champion spirits.