bucket=$1
key=$2
type=$3
out="/tmp/parquetCSV.dat"
cmd="aws s3api --profile=prod select-object-content \
   --bucket \"${bucket}\" \
   --key \"${key}\" \
   --expression 'select txnId from s3object' \
   --expression-type 'SQL' \
   --input-serialization '{\"Parquet\": {}, \"CompressionType\": \"NONE\"}' \
   --output-serialization '{\"${type}\": {}}' \
   ${out}
"
echo $cmd
eval $cmd

cat ${out}

