1. Basic Installation and Setup
Trino is a high-performance distributed SQL query engine for querying large datasets across distributed data sources. Let's learn how to install Trino in your local environment and configure its basic settings.
1.1. Trino Installation (using Docker)
The easiest way to get started with Trino is by using Docker. You can run a Trino container with the following command:
docker run -p 8080:8080 trinodb/trino:latest
This command runs the Trino server on the default port 8080. You can access the Trino UI in your web browser at http://localhost:8080.
1.2. Installing and Using the Trino CLI
The Trino CLI is a command-line interface that allows you to execute Trino queries from your terminal. Use the following commands to download and run the CLI:
wget https://repo1.maven.org/maven2/io/trino/trino-cli/392/trino-cli-392-executable.jar -O trino
chmod +x trino
./trino --server http://localhost:8080 --catalog memory --schema default
Key Concept: Trino uses Catalogs to connect to various data sources, and each catalog contains one or more Schemas. The CLI command connects to the default schema in the memory catalog.