All Products
Search
Document Center

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

Last Updated:Dec 08, 2023

This topic describes how to use the CLI to submit a Presto job.

Prerequisites

Procedure

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

  2. Run the following command on your on-premises machine to modify the permissions on trino:

    sudo chmod +x trino
  3. Start Trino.

    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 the desired cluster.

    3. On the page that appears, click the Access Links and Ports tab.

    4. On the Access Links and Ports tab, view the URL of Trino.

    5. Run the following command to start Trino:

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

      Replace trino in the URL that you obtained with trino-cli. In this example, the URL is https://trino.c-b95f82c36ee646c5.c1e36180fdf3745c9b7bbc8d3e682****.cn-hangzhou.alicontainer.com.

      Enter the password of the admin user. After you log on to Trino, run the following command to query catalogs:

      show catalogs;

      show catalogsFor information about SQL statements, see SQL statement syntax.

  4. View the details of a Presto job.

    1. On the Access Links and Ports tab, click the URL of Trino in the Access URL column.

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

      After you log on to Trino, you can view the details of a Presto job.trino-cli