4.8. Querying Presto#

Any query has to be submitted to the coordinator for processing on the cluster. Typically you need the following parameters to connect:

  • coordinator host name such as presto.example.com, or IP address

  • protocol HTTP, defaults to port 80, or HTTPS, defaults to port 443

  • port, if non-default port is configured and exposed, commonly 8080 or 8443

  • username

  • password

Locate the IP address, protocol, and port of your coordinator, for your connection string, with following the steps:

  1. Navigate to the CloudFormation console under Management Tools within the Services menu.

  2. Select your Stack Name and click the associated tab labeled Outputs.

  3. Note the value for the PrestoCoordinatorURL.

  4. Using the URL within the VPC, exposes the :doc:</admin/web-interface>.

Note

The coordinator IP address is private and therefore only accessible within the same VPC as the SEP cluster stack. You need to ensure run your client tool from within the VPC or allow connectivity to the VPC.

Now you can use any client or driver supported by Presto to connect and query.

Example: Presto CLI#

You can use the Presto CLI from your local workstation:

  1. Install the Presto CLI.

  2. Use the parameters determined in the preceding section.

  3. Run the CLI with URL and username supplied and activate the password dialog:

presto --server https://presto.example.com --user admin --password
  1. Once connected you can check for available catalogs with SHOW CATALOGS, or run any other query.