> For the complete documentation index, see [llms.txt](https://v2.dataos.info/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://v2.dataos.info/build/v1/productize/connect-engine/trino/minerva.md).

# Minerva

Minerva is a Trino-compatible query cluster that DataOS runs and manages in your tenant. Use this path when a Minerva cluster already exists and Vulcan only needs to connect to it. You don't provision anything: you point Vulcan at the running cluster and authenticate with a DataOS Secret. This page covers the connection. For the full reference, see the [Trino engine manual](https://v2.dataos.info/references/engine-guide/trino-1/minerva-1) in References.

## Before you start

You need a running Minerva cluster and its details:

* Cluster name, for example `minerva-cluster`.
* Host, for example `tcp.<env-name>.dataos.cloud`, and port, commonly `7432`.
* Catalog name, for example `s3depot`.
* Your DataOS user ID, API key, and tenant name, to generate a Minerva password: a base64-encoded JSON object with 3 fields, `cluster`, `apikey`, and `tenant`.

{% tabs %}
{% tab title="macOS and Linux" %}

```bash
echo -n '{"cluster":"<cluster>","apikey":"<api-key>","tenant":"<tenant>"}' | base64 | tr -d '\n'
```

{% endtab %}

{% tab title="PowerShell" %}

```powershell
[Convert]::ToBase64String([Text.Encoding]::UTF8.GetBytes('{"cluster":"<cluster>","apikey":"<api-key>","tenant":"<tenant>"}'))
```

{% endtab %}

{% tab title="Command Prompt" %}
Command Prompt has no built-in base64 encoder. Use `certutil`, then strip its header, footer, and line breaks:

```bat
echo {"cluster":"<cluster>","apikey":"<api-key>","tenant":"<tenant>"}> payload.json
certutil -encode payload.json payload.b64
type payload.b64
```

`certutil -encode` wraps the output in `-----BEGIN CERTIFICATE-----` / `-----END CERTIFICATE-----` lines and inserts line breaks every 64 characters. Open `payload.b64`, remove those two header/footer lines, and join the remaining lines into one string before using it as the password. PowerShell is the simpler option on Windows.
{% endtab %}
{% endtabs %}

Confirm the cluster exists:

```bash
dataos-ctl resource get -t minerva -a
dataos-ctl resource get -t minerva -n <minerva-cluster-name>
```

## Permissions

The Minerva user needs `CREATE SCHEMA` on the target catalog, `CREATE TABLE` and `CREATE VIEW` on schemas, `SELECT, INSERT, UPDATE, DELETE` on tables, and `DROP TABLE` for development and full rebuilds.

## 1. Create and project the Secret

Store the user ID and the generated password in a Secret:

```yaml
name: trino-connection-secret
version: v2alpha
type: secret
layer: user
secret:
  type: key-value
  data:
    USER_ID: "<dataos-user-id>"
    PASSWORD: "<base64-json-password>"
```

Apply it, then project the values into the environment variables `config.yaml` reads:

```yaml
use:
  secrets:
    - { id: <tenant>:trino-connection-secret, context_alias: trn }
  env_vars:
    - key: TRINO_USER
      template: "{{ secrets['trn'].USER_ID | base64_decode }}"
    - key: TRINO_PASSWORD
      template: "{{ secrets['trn'].PASSWORD | base64_decode }}"
```

## 2. config.yaml (for local)

```yaml
vde: false
gateways:
  default:
    connection:
      type: trino
      host: "tcp.<env-name>.dataos.cloud"
      port: 7432
      user: "{{ env_var('TRINO_USER') }}"
      catalog: "s3depot"
      http_scheme: https
      method: basic
      password: "{{ env_var('TRINO_PASSWORD') }}"
      verify: true
default_gateway: default
model_defaults:
  dialect: trino
  start: "2024-01-01"
```

{% hint style="warning" %}
`TRINO_PASSWORD` is typically a long, DataOS-issued API key, not a literal password. Confirm the secret's password field carries the full key string: a placeholder or truncated value fails auth with no clearer error.
{% endhint %}

## Supported model kinds

`VIEW`, `FULL`, `SEED`, `INCREMENTAL_BY_TIME_RANGE`, and `INCREMENTAL_BY_PARTITION`. For how each kind materializes, see the [Trino engine manual](https://v2.dataos.info/references/engine-guide/trino-1/minerva-1).

## Before you plan

Confirm:

* `vde: false`, `connection.type: trino`, and `model_defaults.dialect: trino` are set.
* The host, port, user, catalog, and password are all set.
* The Secret is applied and projected.
* The user can create schemas, tables, and views in the target catalog.

Then continue to [Assets](/build/v1/productize/assets.md).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://v2.dataos.info/build/v1/productize/connect-engine/trino/minerva.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
