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.
Log in to the Cloudera web interface and navigate to
the Cloudera Data Warehouse service.
In the Overview page of Cloudera Data Warehouse, click See More in the Resources and
Downloads tile.
Select Trino CLI and 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
In the Cloudera Data Warehouse service
Overview page, for the Virtual Warehouse you want to
connect to the client, click and select Copy Trino
URL.
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 --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 http://trino.example.com:8080
This starts an interactive shell where you can connect to Trino and run
SQL queries.