# PrestoDB

Distributed SQL query engine for big data

- Category: Data warehouses
- Runs in: the Phloem cloud

Lets you and Hamming query the PrestoDB catalogs you pick with SQL, with their tables listed in Trace.

## What Phloem reads
- Schemas, tables and columns in each catalog you pick, listed in Trace for Hamming and SQL autocomplete
- `information_schema` is left out

## What you need
- The coordinator's hostname and HTTP port (default `8080`), reachable from Phloem
- Whether it serves HTTP or HTTPS

## Connect
1. In the console, open **Connectors**, choose **Add connector**, then **PrestoDB**.
2. Enter **Host** and **Port**, choose **Connection Security** (**HTTP (insecure)** or **HTTPS (secure)**), then **Continue**.
3. On **Select Catalogs**, pick the catalogs to connect.
4. Choose **Test Connection**. Then, on **Save Connection**, name the connector and save it.

## What Hamming can do
- Run SQL that you or Hamming write. A table name without a catalog uses the first catalog you picked.

## Notes
- Phloem runs any statement, not only `SELECT`. Limit what the coordinator lets this connection do to keep it read-only.

## Connection fields

| Field | Type | Required | Notes |
|---|---|---|---|
| Host | Text | Yes | PrestoDB coordinator hostname |
| Port | Number | No | HTTP port (default 8080) |
| Connection Security | One of | No | Use HTTPS for secure connections |
| Username | Text | No | Username for authentication (optional for no-auth) |
| Password | Secret | No | Password for authentication |
