Skip to content

Instantly share code, notes, and snippets.

@GopinathMR
Last active June 29, 2017 04:20
Embed
What would you like to do?
json-schema to AWS Athena bulk column format
#!/bin/bash
# $1 is json-schema file path
cat $1 | jq ".properties | to_entries[] | (.key + \" \" + .value.type)" | sed -e "s/integer/int/g" | sed -e "s/ \"$/ string\"/g" | sed -e "s/\"//g" | sed -e "s/$/,/g"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment