Skip to content

Instantly share code, notes, and snippets.

@msdotnetclr
Last active February 13, 2018 20:34
Show Gist options
  • Save msdotnetclr/4beee354b439419ccd58744af640bf07 to your computer and use it in GitHub Desktop.
Save msdotnetclr/4beee354b439419ccd58744af640bf07 to your computer and use it in GitHub Desktop.
Presto CLI script example
export PRESTO_PASSWORD=*****
./presto194 \
--server https://presto.server:31443 \
--catalog <mycatalog> \
--keystore-password password \
--keystore-path /mnt/c/private/presto-client.jks \
--schema <myschema> \
--output-format TSV \
--user <username> \
--password \
-f testquery.sql
@msdotnetclr
Copy link
Author

msdotnetclr commented Feb 13, 2018

To run the script and capture the output to an environment variable, use this:

OUTPUT="$(./testquery.sh)"
echo $OUTPUT | awk '{print $1}'
echo $OUTPUT | awk '{print $2}'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment