Chapter 3. Using Trino
Congratulations! In the prior chapters, you were introduced to Trino and learned how to get it installed, configured, and started. Now you get to use it.
Trino Command-Line Interface
The Trino command-line interface (CLI) provides a terminal-based, interactive shell for running queries and for interacting with the Trino server to inspect its metadata.
Just like the Trino server itself, the Trino CLI release binaries are distributed on the Maven Central Repository. The CLI application is available as an executable JAR file, which allows you to use it like a normal Unix executable.
You can see the list of available versions at https://repo.maven.apache.org/maven2/io/trino/trino-cli.
Locate the version of the CLI that is identical to the Trino server version you
are running. Download the *-executable.jar file from the versioned
directory, and rename it to
trino; for example, with
wget and version 354:
$wget -O trino
Ensure that the file is set to be executable. For convenience, make it available
PATH; for example, by copying it to ~/bin and adding that folder to
$chmod +x trino
$mv trino ~/bin
You can now run the Trino CLI and confirm the version:
$trino --version Trino CLI 354
Documentation for all available options and commands is available with the
Before you start using ...