The Trino command-line interface (CLI) provides a terminal-based, interactive shell for running queries. The CLI is a self-executing JAR file and acts like a normal UNIX executable.
- Ensure you have generated and copied a valid AWC access token (JWT
token) from the API Explorer, as this will be required to authenticate your
connection. For more details, see Create a new access key.
- Make sure Java 11 or later is installed and configured in your
system's path.
-
Log in to the instance.
-
In the Overview page of , click See More in
the Resources and Downloads tile.
-
In the Trino CLI, click
to download the
trino-cli-executable.jar file.
-
Save the
trino-cli-executable.jar file and make it an executable file by running the following command:
chmod +x trino-cli-executable.jar
-
To connect the to the client, click .
-
Paste the copied Trino URL in a text file, to be used in later steps.
-
Open a terminal window to start Trino CLI. You can run the following command to check the version of the CLI:
./trino-cli-executable.jar --version
Run the CLI with
--help or
-h to see all available
options.
-
To start the Trino CLI in an interactive mode, specify the URL of the Trino coordinator that you copied earlier:
./trino-cli-executable.jar https://trino.example.com --user <user-name> --access-token <jwt-token>
This starts an interactive shell where you can connect to Trino and run
SQL queries.