Skip to content
Merged
22 changes: 17 additions & 5 deletions docs/src/user-guide/guides-using-presto.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,26 @@ sample dataset that works well with Presto is [postgresql].

### Setting up Presto

1. Clone the CLP repository:
1. Navigate to `etc/clp-config.yml` and uncomment the `database` section (lines 16 to 20 inclusive).
Change the `database.host` parameter to a non-localhost hostname/IP so that the `database` section
looks like this:

```yaml
database:
type: "mariadb" # "mariadb" or "mysql"
host: "<new-IP-address>"
port: 3306
name: "clp-db"
```

2. Clone the CLP repository:

```bash
git clone https://github.com/y-scope/clp.git
```

2. Navigate to the `tools/deployment/presto-clp` directory in your terminal.
3. Generate the necessary config for Presto to work with CLP:
3. Navigate to the `tools/deployment/presto-clp` directory in your terminal.
4. Generate the necessary config for Presto to work with CLP:

```bash
scripts/set-up-config.sh <clp-json-dir>
Expand All @@ -52,7 +64,7 @@ sample dataset that works well with Presto is [postgresql].
* Replace `<clp-json-dir>` with the location of the clp-json package you set up in the previous
section.

4. Configure Presto to use CLP's metadata database as follows:
5. Configure Presto to use CLP's metadata database as follows:

* Open and edit `coordinator/config-template/metadata-filter.json`.
* For each dataset you want to query, add a filter config of the form:
Expand All @@ -78,7 +90,7 @@ sample dataset that works well with Presto is [postgresql].
this particular dataset.
* The complete syntax for this file is [here][clp-connector-docs].

5. Start a Presto cluster by running:
6. Start a Presto cluster by running:

```bash
docker compose up
Expand Down