This page will help you download and configure the Presto command-line interface (CLI) to query your Presto Clusters. The official Presto CLI documentation can be found here.
This step is for Ahana Cloud for Presto.
- Log into your Ahana Cloud SaaS Console.
- Go to Clusters.
- Make note of the Presto cluster version and endpoint under the Information and Connection Details section, respectively.
- You will also need your Presto cluster username and password.
- Navigate to the Presto CLI build artifact page for your Presto version (or higher). The Presto CLI build artifacts are hosted at: https://repo1.maven.org/maven2/com/facebook/presto/presto-cli/ with a distinct directory for each Presto version. For example, if you wanted the 0.251 Presto version, you would navigate to https://repo1.maven.org/maven2/com/facebook/presto/presto-cli/0.251/.
- Download the executable JAR. This file is called
The CLI is a self-executing JAR file.
- For convenience, rename your executable JAR to
- Make the JAR executable with
chmod +x presto.
You will need a Java Runtime Environment (JRE) on your local machine to to run the CLI. Make sure you have at least Java 8 or higher installed on your local machine.
- Using your Presto cluster endpoint and username, you can connect the Presto CLI to your cluster with the following command:
You will be prompted for your password.
A successful connection with show you a Presto command line prompt:
presto>. You can now submit queries to your cluster. For example: