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.
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:
Navigate to Workbench and click + New Collection.
Select Presto from the command type drop-down list.
Choose the cluster on which you want to run the query. View the health metrics of a cluster before you decide to use it.
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.
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.
Add macro details (as needed).
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.
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.