# Trino

## Setup

The following credentials keys are accepted:

* `http_url` **(required)** -> The url to use to connect (examples: `http://user:password@localhost:8080?catalog=memory&schema=test`)
* `catalog` **(required)** -> The database / catalog name of the instance
* `schema` (optional) -> The default schema to use
* `source` (optional) -> Source of the connection
* `session_properties` (optional) -> Session properties, as a `map[string]string`
* `extra_credentials` (optional) -> Extra credentials, as a `map[string]string`
* `custom_client_name` (optional) -> Custom client name
* `kerberos_enabled` (optional) -> KerberosEnabled (default is false)
* `kerberos_keytab_path` (optional) -> Kerberos Keytab Path
* `kerberos_principal` (optional) -> Kerberos Principal used to authenticate to KDC
* `kerberos_realm` (optional) -> The Kerberos Realm
* `kerberos_config_path` (optional) -> The krb5 config path
* `ssl_cert_path` (optional) -> The SSL cert path on local disk for TLS verification
* `ssl_cert` (optional) -> The SSL cert string value for TLS verification
* `skip_tls` (optional) -> Whether to skip TLS verification (specify `true`).
* `query_timeout` (optional since *1.2.21*) -> The number of minutes to timeout a query (default is `360`).
* `use_adbc` (optional) -> Enable Arrow Database Connectivity (ADBC) driver for high-performance data transfer. See [ADBC](/connections/database-connections/adbc.md) for setup and details. (*v1.5.2+*)
* `adbc_uri` (optional) -> Override the automatically constructed ADBC connection URI when using `use_adbc=true`.

### Using `sling conns`

Here are examples of setting a connection named `TRINO`. We must provide the `type=trino` property:

{% code overflow="wrap" %}

```bash
$ sling conns set TRINO type=trino http_url="http://user:password@localhost:8080?catalog=memory&schema=test"

```

{% endcode %}

### Environment Variable

See [here](https://docs.slingdata.io/connections/database-connections/pages/eAdVs2BHCgdr6RS8GoJC#dot-env-file-.env.sling) to learn more about the `.env.sling` file.

{% code overflow="wrap" %}

```bash
export TRINO='{ type: trino, http_url: "http://user:password@localhost:8080?catalog=memory&schema=test" }'
```

{% endcode %}

### Sling Env File YAML

See [here](https://docs.slingdata.io/connections/database-connections/pages/eAdVs2BHCgdr6RS8GoJC#sling-env-file-env.yaml) to learn more about the sling `env.yaml` file.

```yaml
connections:
  TRINO:
    type: trino
    http_url: <http_url>
    catalog: <catalog>
    schema: <schema>
    ssl_cert_path: <ssl_cert_path>
```

If you are facing issues connecting, please reach out to us at <support@slingdata.io>, on [discord](https://discord.gg/q5xtaSNDvp) or open a Github Issue [here](https://github.com/slingdata-io/sling-cli/issues).


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.slingdata.io/connections/database-connections/trino.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
