Skip to main content

Connect via Presto CLI

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.

Step 0: Identify your Presto cluster version and endpoint

This step is for Ahana Cloud for Presto.

  1. Log into your Ahana Cloud SaaS Console.
  2. Go to Clusters.
  3. Make note of the Presto cluster version and endpoint under the Information and Connection Details section, respectively.
  4. You will also need your Presto cluster username and password.

Ahana Presto connection details

Step 1: Download the Presto CLI executable JAR

  1. Navigate to the Presto CLI build artifact page for your Presto version (or higher). The Presto CLI build artifacts are hosted at: with a distinct directory for each Presto version. For example, if you wanted the 0.251 Presto version, you would navigate to
  2. Download the executable JAR. This file is called presto-cli-{version}-executable.jar.

Step 2: Rename and make executable

The CLI is a self-executing JAR file.

  1. For convenience, rename your executable JAR to presto.
  2. 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.

Step 3: Connect to your Presto cluster

  1. Using your Presto cluster endpoint and username, you can connect the Presto CLI to your cluster with the following command:
./presto --server --user Admin --password

  1. You will be prompted for your password.

  2. A successful connection with show you a Presto command line prompt: presto>. You can now submit queries to your cluster. For example:

presto> show catalogs;