Compose a Presto QueryΒΆ

Presto is supported on the AWS, Azure, and GCP cloud platforms.

Presto queries can be run only on Presto clusters. See Mapping of Cluster and Command Types for more information.

Note

Run only Hive DDL commands on a Presto cluster. Running Hive DML commands on a Presto cluster is not supported and will result in failed queries.

Perform the following steps to compose a Presto query:

  1. Navigate to Workbench and click + New Collection.

  2. Select Presto from the command type drop-down list.

  3. Choose the cluster on which you want to run the query. View the health metrics of a cluster before you decide to use it.

  4. Query Statement is selected by default from the drop-down list (upper-right corner of the screen). Enter the Presto query in the text field.

    or

    To run a query stored, select Query Path from the drop-down list, then specify the cloud storage path that contains the Presto query file.

  5. Add macro details (as needed).

  6. Click Run to execute the query.

Monitor the progress of your job using the Status and Logs tabs. You can toggle between the two using a switch. The Status pane also displays useful debugging information if the query does not succeed. For more information on how to download command results and logs, see Get Results.

Note

For a given Presto query, a new Presto Query Tracker is displayed in the Logs tab when:

  • A cluster instance that ran the query is still up.
  • The query information is still present in the Presto server in that cluster instance. The query information is periodically purged from the server.

If any of the above 2 conditions is not met, the older Presto Query Tracker is displayed in the Logs tab.

Select the Resources filter to view these details.

For REST API-related information, see Submit a Presto Command.