Skip to Content
Trino: The Definitive Guide
book

Trino: The Definitive Guide

by Matt Fuller, Manfred Moser, Martin Traverso
April 2021
Intermediate to advanced
308 pages
7h 33m
English
O'Reilly Media, Inc.
Content preview from Trino: The Definitive Guide

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.

Getting Started

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 \
https://repo.maven.apache.org/maven2/\
io/trino/trino-cli/354/trino-cli-354-executable.jar

Ensure that the file is set to be executable. For convenience, make it available on the PATH; for example, by copying it to ~/bin and adding that folder to the PATH:

$ chmod +x trino
$ mv trino ~/bin
$ export PATH=~/bin/:$PATH

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 help option:

$ trino --help

Before you start using ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

Trino: The Definitive Guide, 2nd Edition

Trino: The Definitive Guide, 2nd Edition

Matt Fuller, Manfred Moser, Martin Traverso
Spark: The Definitive Guide

Spark: The Definitive Guide

Bill Chambers, Matei Zaharia
Vert.x in Action

Vert.x in Action

Julien Ponge
gRPC: Up and Running

gRPC: Up and Running

Kasun Indrasiri, Danesh Kuruppu

Publisher Resources

ISBN: 9781098107703Errata Page