5.5. 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
  • protocol HTTP, defaults to port 80, or HTTPS, defaults to port 443
  • port, if non-default port is configured and exposed
  • username
  • password

Host name, protocol and port are configured by the service properties. Typically, a service name is defined and HTTPS is used.

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.