Yandex Cloud
Search
Contact UsGet started
  • Blog
  • Pricing
  • Documentation
  • All Services
  • System Status
    • Featured
    • Infrastructure & Network
    • Data Platform
    • Containers
    • Developer tools
    • Serverless
    • Security
    • Monitoring & Resources
    • ML & AI
    • Business tools
  • All Solutions
    • By industry
    • By use case
    • Economics and Pricing
    • Security
    • Technical Support
    • Customer Stories
    • Start testing with double trial credits
    • Cloud credits to scale your IT product
    • Gateway to Russia
    • Cloud for Startups
    • Education and Science
    • Yandex Cloud Partner program
  • Blog
  • Pricing
  • Documentation
© 2025 Direct Cursus Technology L.L.C.
Yandex Managed Service for Trino
  • Getting started
  • Quotas and limits
  • Access management
  • Pricing policy
  • Release notes

In this article:

  • Getting started
  • Create a Managed Service for Trino cluster
  • Connect to the Managed Service for Trino cluster through the Trino CLI
  • Send queries to the Managed Service for PostgreSQL cluster through Trino
  • Check the queries in the Managed Service for PostgreSQL cluster

Getting started with Yandex Managed Service for Trino

Written by
Yandex Cloud
Improved by
Danila N.
Updated at May 13, 2025
  • Getting started
  • Create a Managed Service for Trino cluster
  • Connect to the Managed Service for Trino cluster through the Trino CLI
  • Send queries to the Managed Service for PostgreSQL cluster through Trino
  • Check the queries in the Managed Service for PostgreSQL cluster

Note

The service is at the Preview stage.

To get started:

  1. Create a Managed Service for Trino cluster.
  2. Connect to the Managed Service for Trino cluster.
  3. Send queries to the Yandex Managed Service for PostgreSQL cluster through Trino.
  4. Check the queries in the Managed Service for PostgreSQL cluster.

Getting startedGetting started

  1. Go to the management console and log in to Yandex Cloud or sign up if not signed up yet.

  2. If you do not have a folder yet, create one:

    1. In the management console, select the appropriate cloud from the list on the left.

    2. At the top right, click Create folder.

    3. Give your folder a name. The naming requirements are as follows:

      • It must be from 2 to 63 characters long.
      • It may contain lowercase Latin letters, numbers, and hyphens.
      • It must start with a letter and cannot end with a hyphen.
    4. Optionally, specify the description for your folder.

    5. Select Create a default network. This will create a network with subnets in each availability zone. Within this network, you will also have a default security group, inside which all network traffic will be allowed.

    6. Click Create.

  3. Assign the following roles to your Yandex Cloud account:

    • managed-trino.admin: To create a cluster.
    • vpc.user: To use the cluster network.
    • iam.serviceAccounts.user: To link a service account to the cluster.

    Note

    If you are unable to manage roles, contact your cloud or organization administrator.

  4. Create a service account with the managed-trino.integrationProvider and storage.editor roles.

  5. Create a Yandex Managed Service for PostgreSQL cluster Trino will work with.

Create a Managed Service for Trino clusterCreate a Managed Service for Trino cluster

Management console
  1. In the management console, select the folder where you want to create a Managed Service for Trino cluster.

  2. Select Managed Service for Trino.

  3. Click Create cluster.

  4. Specify a name for the cluster.

  5. In the Service account field, select the previously created service account.

  6. Under Network settings, select a network, subnet, and security group for the cluster.

  7. Configure the coordinator and workers.

  8. Under Catalogs, add catalogs one by one:

    1. For the previously created Managed Service for PostgreSQL cluster:

      • Catalog name: test.

      • Connector type: PostgreSQL.

      • URL: jdbc:postgresql://<PostgreSQL_cluster_host_FQDN>:6432/<DB_name>?ssl=true&sslmode=verify-full.

        To learn how to get the FQDN of a host in a Managed Service for PostgreSQL cluster, see this guide.

      • Username: Username in the Managed Service for PostgreSQL cluster.

      • Password: User password.

    2. To generate test data:

      • Catalog name: data.
      • Connector type: TPC-H.

    You can add folders both when you are creating a cluster and after you have done so.

  9. Optionally, under Advanced settings, configure logging:

    1. Enable the Write logs setting.
    2. Select where the logs will be stored:
      • Folder: Select a folder from the list.
      • Group: Select a log group from the list or create a new one.
    3. Select Min. logging level from the list.
  10. Click Create.

  11. Wait until the cluster is ready: its status on the Managed Service for Trino dashboard will change to Running and its state, to Alive. This may take some time.

Connect to the Managed Service for Trino cluster through the Trino CLIConnect to the Managed Service for Trino cluster through the Trino CLI

If you do not have the Trino CLI yet, install it using the guide on the official Trino website.

To connect to an Managed Service for Trino cluster:

  1. Create an IAM token and put it to the TRINO_PASSWORD environment variable:

    export TRINO_PASSWORD=$(yc iam create-token)
    

    This IAM token in TRINO_PASSWORD will be your password to the Managed Service for Trino cluster. To enable it, specify the --password flag upon connection.

  2. Connect to the Managed Service for Trino cluster:

    ./trino <coordinator_URL> --user iam --password
    

    You can copy the coordinator URL and paste it to the Coordinator field on the Trino overview page in the management console.

Send queries to the Managed Service for PostgreSQL cluster through TrinoSend queries to the Managed Service for PostgreSQL cluster through Trino

  1. Connect to the Trino cluster through the Trino CLI.

    To follow the steps below, use the Trino CLI.

  2. Create a new schema in the Managed Service for PostgreSQL cluster:

    CREATE SCHEMA IF NOT EXISTS test.tpch_postgresql;
    
  3. Create a table:

    CREATE TABLE IF NOT EXISTS test.tpch_postgresql.customers (
       name VARCHAR,
       phone VARCHAR,
       acctbal DOUBLE
    );
    
  4. Populate the table with data from the test data folder:

    INSERT INTO test.tpch_postgresql.customers
    SELECT
      name,
      phone,
      acctbal
    FROM data.sf100000.customer
    LIMIT 1000000;
    
  5. Get the number of rows in the table:

    SELECT COUNT(*) as count FROM test.tpch_postgresql.customers;
    

    Expected response:

      count  
    ---------
     1000000 
    (1 row)
    

Check the queries in the Managed Service for PostgreSQL clusterCheck the queries in the Managed Service for PostgreSQL cluster

To check whether the queries to the Managed Service for PostgreSQL cluster are running correctly, connect to the cluster database and get the number of rows in the customers table:

SELECT COUNT(*) FROM tpch_postgresql.customers;

Expected response:

  count  
---------
 1000000
(1 row)

What's next

  • Learn about service resource relationships.
  • Explore other methods of connecting to a Managed Service for Trino cluster.

Was the article helpful?

Next
All guides
© 2025 Direct Cursus Technology L.L.C.