> ## Documentation Index
> Fetch the complete documentation index at: https://honeydew.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Superset/Preset

Superset / Preset connect to Honeydew via JDBC connection, using the **Trino** protocol.

## Metadata Sync

With Metadata Sync, Honeydew can synchronize metadata such as field descriptions to Superset or Preset.

<Note>
  Metadata Sync for Preset is in Preview. Reach out to [support@honeydew.ai](mailto:support@honeydew.ai) to enable.
</Note>

## Passing Parameters

Parameters can be passed to the Honeydew [SQL interface](/integration/sql-interface) via the FROM statement.

Preset and Superset can [parameterize queries using Jinja](https://docs.preset.io/docs/parametrizing-queries-using-jinja).

To pass a URL parameter from Superset/Preset, create a Virtual Dataset (with a custom SQL) that looks as following:

```sql theme={null}
-- pass URL parameter param1 from Preset to a Honeydew parameter
select *, '{{ url_param('param1') }}' as "$param1"
from domains.analytics
```

To pass an SQL Lab [template parameter](https://docs.preset.io/docs/using-template-parameters-in-sql-lab), build SQL that looks like:

```sql theme={null}
-- pass template parameter $param1 from Preset to a Honeydew parameter
select *, '{{ param1 }}' as "$param1"
from domains.analytics
```

## Setting up a New Database connection

Superset/Preset database connections are mapped to a Honeydew workspace and branch

<Tip>
  It is recommended to use an [API Key](/access-control/api-keys) for setting up the connection.
</Tip>

1. Create a new database

2. Choose **Trino** from the list of supported databases

3. Set a unique **Display Name** for the connection (e.g. "Honeydew")

4. Enter the following **URI** as the input:

   ```
   trino://<api key>:<api secret>@jdbc.honeydew.cloud:443/<workspace>__<branch>
   ```

   Where `<api key>` is the generated API key, and `<api secret>` is the corresponding API secret.

   Or alternatively:

   ```
   trino://<user>:<password>@jdbc.honeydew.cloud:443/<workspace>__<branch>
   ```

   Where `<user>` is a Honeydew username, and `<password>` is that user's password.

   <Note>
     API key and API secret (or alternatively, user and password) must be url-encoded.,
     i.e. `user@domain.com` is `user%40domain.com`.
     Encoding can be done using python (`from urllib.parse import quote_plus`), or via any urlencode website.
   </Note>

   <Note>
     If your organization uses a custom hostname for the JDBC connection,
     you can locate it in the Honeydew UI, under the **JDBC** section in **Settings**.
   </Note>

   For example, for user `user@domain.com`, password `123456` and workspace `tpch` (`prod` branch) the URI would be:

   ```
   trino://user%40domain.com:123456@jdbc.honeydew.cloud:443/tpch
   ```

   And for `dev` branch:

   ```
   trino://user%40domain.com:123456@jdbc.honeydew.cloud:443/tpch__dev
   ```

5. Click **Test Connection** to verify the connection settings

6. Create the database connection

## Creating a new dataset

A dataset in Superset/Preset is mapped to a specific database connection, and a specific domain.

1. Create a new dataset
2. Choose the previously created database connection (it will be of type `trino`)
3. For **SCHEMA**, choose `world` if you would like to connect to all metadata in Honeydew,
   or `domains` if you would like to connect to a specific domain
4. For **TABLE**, choose `world` if you have chosen the `world` schema, or choose the relevant domain,
   if you have chosen the `domains` schema
5. Create the dataset
6. You can now create charts and dashboards using this dataset
