2.2. Command Line Interface
The Presto CLI provides a terminal-based interactive shell for runningqueries. The CLI is aself-executingJAR file, which means it acts like a normal UNIX executable.
Download presto-cli-0.229-executable.jar, rename it to presto
,make it executable with chmod +x
, then run it:
- ./presto --server localhost:8080 --catalog hive --schema default
Run the CLI with the —help
option to see the available options.
By default, the results of queries are paginated using the less
programwhich is configured with a carefully selected set of options. This behaviorcan be overridden by setting the environment variable PRESTO_PAGER
to thename of a different program such as more
, or set it to an empty valueto completely disable pagination.