# Redshift Tools

The Redshift Tools allow DinoAI to explore your Amazon Redshift account — listing databases, schemas, tables, and columns — so it can help you write accurate SQL, build dbt models, and understand your data structure, all without leaving Paradime.

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

#### Capabilities

The Redshift Tools give DinoAI the following abilities:

* List all non-template databases in your Redshift account
* List all schemas within a given database (system schemas such as `pg_*` and `information_schema` are excluded automatically)
* List all base tables within a given database and schema, including descriptions from `pg_catalog`
* Inspect column names, data types, and descriptions for any table, with descriptions sourced from `pg_catalog.col_description`

#### Using the Redshift Tools

1. Open DinoAI in the right panel of the Code IDE
2. Describe what you want to explore (e.g., a database 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 Redshift account
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 `public` schema of my `analytics` database and generate a dbt sources.yml.
```

**Result:** DinoAI queries Redshift's `information_schema.columns` and `pg_catalog` for column names, data types, and descriptions, then produces a ready-to-use `sources.yml` file with the correct structure and any available column descriptions pre-filled.

**Exploring an Unfamiliar Database**

**Prompt**

```
What schemas and tables are available in my `raw` database?
```

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

**Understanding a Table's Structure**

**Prompt**

```
What columns does the `customer_events` table in `analytics.public` have?
```

**Result:** DinoAI returns all column names, data types, and any descriptions registered in `pg_catalog`, ordered by ordinal position, so you can immediately understand the schema.

#### Working with Other Tools

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

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

#### Best Practices

* **List databases and schemas first** — If you're unsure of exact names, ask DinoAI to list databases and schemas before drilling into tables or columns
* **Identifiers are normalised to lowercase** — DinoAI automatically lowercases identifiers when querying Redshift; this matches Redshift's case-insensitive behaviour for unquoted names
* **System schemas are excluded automatically** — `pg_*` schemas and `information_schema` 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 Redshift credential has the necessary read permissions on the target database and schemas
