All Products
Search
Document Center

E-MapReduce:Use the CLI to submit a Presto job

Last Updated:Mar 26, 2026

Use the Trino command-line interface (CLI) to connect to a Presto cluster on E-MapReduce (EMR) on ACK, run SQL queries, and view job details.

Prerequisites

Before you begin, ensure that you have:

Set up the Trino CLI

  1. Download trino to a directory on your on-premises machine.

  2. Make the binary executable:

    sudo chmod +x trino

Connect to your Presto cluster

  1. Log on to the EMR console. In the left-side navigation pane, click EMR on ACK.

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

  3. Click the Access Links and Ports tab, then locate the URL for Trino.

  4. Replace trino in the URL with trino-cli. For example, if the URL shown is:

    https://trino.c-b95f82c36ee646c5.c1e36180fdf3745c9b7bbc8d3e682****.cn-hangzhou.alicontainer.com

    Use the following as your server URL:

    https://trino-cli.c-b95f82c36ee646c5.c1e36180fdf3745c9b7bbc8d3e682****.cn-hangzhou.alicontainer.com
  5. Start the CLI with the modified URL:

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

    Enter the admin user password when prompted.

  6. After logging on, run the following command to list available catalogs:

    show catalogs;

    For supported SQL statements, see SQL statement syntax.

    show catalogs

View Presto job details

  1. On the Access Links and Ports tab, click the Trino URL in the Access URL column to open the Trino web UI.

  2. Enter the admin user credentials and click Log In. After you log on to Trino, you can view the details of a Presto job.

    trino-cli