bucket=$1
filepath=$2
outfile="/tmp/parquetToJSON.json"
aws s3api --profile=prod select-object-content \
   --bucket "${bucket}" \
   --key "${filepath}" \
   --expression "select * from s3object limit 1000" \
   --expression-type 'SQL' \
   --input-serialization '{"Parquet": {}, "CompressionType": "NONE"}' \
   --output-serialization '{"JSON": {}}' \
   ${outfile}

cat ${outfile}
