# Trino Tools

The Trino Tools allow DinoAI to explore your Trino instance — listing catalogs, schemas, tables, and columns — so it can help you write accurate SQL, build dbt models, and understand your data structure across all connected data sources, all without leaving Paradime.

{% hint style="info" icon="plug-circle-plus" %}
**Requires a Trino connection.** These tools are only available when your workspace is connected to Trino. See your workspace settings to [configure a Trino credential](https://docs.paradime.io/app-help/documentation/settings/connections/development-environment/starburst-trino).
{% endhint %}

#### Capabilities

The Trino Tools give DinoAI the following abilities:

* List all catalogs (databases) available in your Trino instance from `system.metadata.catalogs`
* List all schemas within a given catalog (system schemas such as `information_schema` and `pg_catalog` are excluded)
* List all base tables within a given catalog and schema, including table comments
* Inspect column names, data types, and comments for any table

#### Using the Trino Tools

1. Open DinoAI in the right panel of the Code IDE
2. Describe what you want to explore (e.g., a catalog name, a schema, or the columns of a specific table)
3. Add your prompt describing what you want DinoAI to do with that information
4. Grant permission when DinoAI asks to access your Trino instance
5. Review the results and implement DinoAI's suggested actions

#### Example Use Cases

**Generating a dbt Source File**

**Prompt**

```
List the columns in the `orders` table in the `hive.raw` catalog and schema, then generate a dbt sources.yml.
```

**Result:** DinoAI queries `information_schema.columns` for the specified table, fetches column names, data types, and comments, and produces a ready-to-use `sources.yml` file with the correct structure and any available column descriptions pre-filled.

**Exploring an Unfamiliar Catalog**

**Prompt**

```
What schemas and tables are available in my `hive` catalog?
```

**Result:** DinoAI first lists all schemas in the catalog (excluding system schemas), then lists the tables and their descriptions within them, giving you a complete picture before writing queries or building models.

**Understanding a Table's Structure**

**Prompt**

```
What columns does the `pageviews` table in `hive.events` have?
```

**Result:** DinoAI returns all column names, data types, and comments ordered by ordinal position, so you can immediately understand the schema and start writing accurate SQL.

#### Working with Other Tools

The Trino Tools work well alongside DinoAI's other capabilities:

* Combine with the **dbt Tools** to inspect Trino source tables and immediately scaffold dbt models or source definitions
* Combine with the **Catalog Search Tool** to cross-reference Trino table structure with existing dbt model documentation
* Combine with the **Column Level Lineage Tool** to trace how a specific column flows from a raw Trino table through your dbt transformations

#### Best Practices

* **Use the three-part identifier** — Trino tables are referenced as `catalog.schema.table`; providing all three parts helps DinoAI navigate directly to the right resource
* **List catalogs first** — If you're unsure of exact names, ask DinoAI to list catalogs, then schemas, then tables before drilling into columns
* **Identifiers are normalised to lowercase** — DinoAI automatically lowercases identifiers when querying Trino; this matches Trino's case-insensitive behaviour for unquoted names
* **System schemas are excluded automatically** — `information_schema` and `pg_catalog` are filtered out by default; you don't need to exclude them manually
* **Check permissions** — DinoAI surfaces a `[ERROR]` if it cannot access a resource; confirm your Trino credential has the necessary read permissions on the target catalogs and schemas
