All Products
Search
Document Center

E-MapReduce:Submit a Presto job using the CLI

Last Updated:Jun 18, 2026

This topic describes how to submit a Presto job using the command-line interface (CLI).

Prerequisites

  • You have created a Presto cluster in the E-MapReduce on ACK console. For more information, see Quick start.

  • You have the AliyunOSSFullAccess and AliyunDLFFullAccess permissions. For more information, see Role authorization.

  • You have configured the password for the admin user of the Presto cluster. For more information, see Configure the cluster management password.

Procedure

  1. Download the trino executable file to a local directory.

  2. Run this command to modify the file permissions:

    sudo chmod +x trino
  3. Start the Trino CLI.

    1. Log on to the EMR on ACK console.

    2. On the EMR on ACK page, click the name of the target cluster.

    3. Click the Access Links and Ports tab.

    4. On the Access Links and Ports page, obtain the link for the Trino web UI.

    5. On your local machine, run the following command to start the Trino CLI:

      ./trino --server https://trino-cli.c-b95f82c36ee646c5.c1e36180fdf3745c9b7bbc8d3e682****.cn-hangzhou.alicontainer.com --user admin --password --insecure
      Important

      The Trino web UI link from the previous step is https://trino.c-b95f82c36ee646c5.c1e36180fdf3745c9b7bbc8d3e682****.cn-hangzhou.alicontainer.com. Replace trino in the link with trino-cli.

      When prompted, enter the password configured for the admin user. After you log on, you can run the following command to query catalogs.

      show catalogs;
      Georges-MacBook-Pro:taihaoJobs georgechen$ ./trino --server https://trino-cli.c-b95f82c36ee646c5.c1e36180fdf3745c9b7bxxx.cn-hangzhou.alicontainer.com --user admin --password --insecure
      Password:
      trino> show catalogs;
       Catalog
      ---------
       hive
       system
       tpcds
      (3 rows)
      Query 20210805_082129_00031_bufux, FINISHED, 2 nodes
      Splits: 36 total, 36 done (100.00%)
      0.24 [0 rows, 0B] [0 rows/s, 0B/s]
      trino>

      For more information about SQL statement syntax, see SQL statement syntax.

  4. View job details.

    1. On the Access Links and Ports page, click the link for the Trino web UI.

    2. Enter the username admin and its password, and then click Log In.

      After you log on, you are redirected to the Trino web UI, where you can view job execution details and monitor queries. The top of the page displays cluster metrics, such as QUEUED QUERIES, RUNNABLE DRIVERS, and RESERVED MEMORY. In the QUERY DETAILS section, you can search for and filter query records by user, source, query ID, or query status. This section also displays detailed information for each query, including the SQL statement, execution status, and duration.