# Starburst/Trino

Trino (formerly PrestoSQL) is a distributed SQL query engine designed to query large data sets distributed over one or more heterogeneous data sources. As a scheduler environment in Paradime, Trino enables deploying dbt™ in production with [Bolt](https://docs.paradime.io/app-help/documentation/bolt).

{% hint style="warning" %}
**IP RESTRICTIONS**

Make sure to allow traffic from one of the Paradime IPs in your firewall depending on the data location selected.

👉 See also: [Paradime IP addresses](https://docs.paradime.io/app-help/developers/ip-restrictions).
{% endhint %}

### Authentication Methods

Trino supports multiple authentication methods. Set `method` to one of these values:

* `LDAP` - Username and password authentication via LDAP. See [LDAP authentication docs](https://trino.io/docs/current/security/ldap.html).&#x20;
* `JWT` - JSON Web Token authentication. See [JWT authentication docs](https://trino.io/docs/current/security/jwt.html).&#x20;

### Setup Instructions

1. Click **Settings** in the top menu bar of the Paradime interface to access **Account Settings**
2. In the left sidebar, click "**Connections**"
3. Click "**Add New**" next to the **Bolt Schedules** section
4. Select "Trino" and fill out the corresponding fields.&#x20;
5. In the **Profile Configuration** field, add the following parameters based on your authentication method. Reference the [**Profile Fields Reference**](#profile-fields-reference) section below for additional context and configurations:

{% tabs %}
{% tab title="LDAP" %}

```yaml
method: ldap                            # Authentication method type
user: analyst@company.com               # Username in required format
password: ldap_pass_123                 # LDAP authentication password
host: analytics.galaxy.starburst.io     # Trino server hostname
database: analytics                     # Target catalog name
port: 443                               # Server port number
```

See [LDAP authentication docs](https://trino.io/docs/current/security/ldap.html) for additional support
{% endtab %}

{% tab title="JWT" %}

```yaml
method: jwt                                # Authentication method type
jwt_token: eyJIsInR5cCI6IkpXVCJ9           # Valid JWT token string
host: analytics.galaxy.starburst.io        # Trino server hostname
database: analytics                        # Target catalog name
port: 443                                  # Server port number 
```

See [JWT authentication docs](https://trino.io/docs/current/security/jwt.html)  for additional support
{% endtab %}
{% endtabs %}

{% hint style="info" %}
After adding the configuration, ensure it's properly formatted using a YAML formatter like [YAML Formatter](https://jsonformatter.org/yaml-formatter).
{% endhint %}

6. Provide a dbt™ **Profile Name** (This should match with the profile name set in your `dbt_project.yml`).
7. In the **Target** field, enter "**`prod`**". This is the default target your dbt™ project will use for your [Bolt Schedules.](https://docs.paradime.io/app-help/documentation/bolt)
8. The "**Schema**" field is pre-configured, but you can change it to specify the schema where dbt will build objects.
9. The "**Threads**" value is pre-configured to 1, but you can adjust this number to specify how many parallel operations your dbt project can run.

***

### Example Profile Configuration

<figure><img src="https://2337193041-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHET0AD04uHMgdeLAjptq%2Fuploads%2FFVrHpko3n6EsVpf1lGMv%2Fimage.png?alt=media&#x26;token=9971e9d8-fa04-4509-86f5-b81dfc746283" alt=""><figcaption><p>Profile configuration example is for "LDAP" configuration</p></figcaption></figure>

***

### Profile Fields Reference

<table><thead><tr><th width="163">Field</th><th width="231">Description</th><th width="294">Example</th><th width="137">Default Value</th><th width="121">Required</th></tr></thead><tbody><tr><td>type</td><td>Specifies Trino connection type</td><td><code>trino</code></td><td>None</td><td>✅</td></tr><tr><td>method</td><td>Authentication method (ldap, kerberos, jwt, etc.)</td><td><code>idap</code></td><td>None</td><td>✅</td></tr><tr><td>user</td><td>The username (of the account) to log in to your cluster. When connecting to Starburst Galaxy clusters, you must include the role of the user as a suffix to the username.</td><td><p>Format for Starburst Enterprise or Trino:</p><ul><li><code>user.name</code></li><li><code>user.name@mydomain.com</code></li></ul><p><br>Format for Starburst Galaxy:</p><ul><li><code>user.name@mydomain.com/role</code></li></ul></td><td>None</td><td>✅</td></tr><tr><td>password</td><td>Authentication password (for LDAP)</td><td><code>your_password</code></td><td>None</td><td>✅</td></tr><tr><td>host</td><td>Trino cluster hostname. <br><br>Don't include the <code>http://</code> or <code>https://</code> prefix.</td><td><code>analytics.galaxy.starturst.io</code></td><td>None</td><td>✅</td></tr><tr><td>catalog</td><td>Catalog name in Trino cluster</td><td><code>analytics_catalog</code></td><td>None</td><td>✅</td></tr><tr><td>schema</td><td><p>Default schema where dbt will build objects. <br></p><p>This is configured in the UI "Schema" field</p></td><td><code>reporting</code></td><td>None</td><td>✅</td></tr><tr><td>port</td><td>Trino server port number</td><td><code>443</code></td><td><code>443</code></td><td>✅</td></tr><tr><td>threads</td><td>Number of concurrent operations.<br><br>This is configured in the UI "Threads" field</td><td><code>4</code></td><td><code>1</code></td><td>❌</td></tr><tr><td>roles</td><td>Catalog-specific role assignments</td><td><code>system: analyst</code></td><td>None</td><td>❌</td></tr><tr><td>session_properties</td><td>Custom Trino session settings</td><td><code>query_max_run_time: 4h</code></td><td>None</td><td>❌</td></tr><tr><td>http_scheme</td><td>Connection protocol (http/https)</td><td><code>https</code></td><td><code>http</code></td><td>❌</td></tr></tbody></table>
