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

# Amazon Redshift

> Let agents list schemas and tables and run read-only SQL on Redshift through the Data API

The Redshift connector uses the Redshift Data API, so Danube needs no driver and no network path to your cluster: every call is an authenticated AWS API request. It works with provisioned clusters and Redshift Serverless. Setup and the IAM policy are on the [AWS page](/connectors/aws#redshift).

## Connection fields

Besides the AWS fields (role or keys, region), store:

* **Cluster identifier** for a provisioned cluster, or **Serverless workgroup** for Redshift Serverless (one of the two);
* **Database**;
* **Database user** (provisioned clusters: Danube connects as this user with temporary IAM credentials) or **Secret ARN** (a Secrets Manager secret holding a user name and password).

## Tools

| Tool                | What it returns                                                                                                                                                                        |
| ------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Test Connection** | The AWS account and identity, and whether it may list schemas in the database                                                                                                          |
| **List Schemas**    | Schemas in the database, system schemas left out                                                                                                                                       |
| **List Tables**     | Tables and views in a schema, filterable by pattern                                                                                                                                    |
| **Run Query**       | Rows of one read-only `SELECT`, as objects, at most `max_rows` (default 500). A query still running at the deadline returns its `statement_id`; call again with it to collect the rows |

## Read-only at the source

The Data API has no read-only switch, so the database user decides what a statement can do. Run Query refuses comments, several statements and write keywords before anything is sent, but connect as a user that can only read:

```sql theme={null}
CREATE USER danube_readonly PASSWORD DISABLE;  -- IAM authentication only
GRANT USAGE ON SCHEMA public TO danube_readonly;
GRANT SELECT ON ALL TABLES IN SCHEMA public TO danube_readonly;
ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT SELECT ON TABLES TO danube_readonly;
```

Repeat the grants for every schema agents should read. For a secret, create the user with a password instead and store the name and password in Secrets Manager.

## Limits

* Calls time out after 15 s by default (up to 55 s). A statement that times out keeps running in Redshift; its result stays available for 24 hours through `statement_id`.
* The row cap cuts what is returned, not what Redshift computes. Add a `LIMIT` to large queries.

## Example prompts

* "Which tables are in the `sales` schema?"
* "How many orders failed payment per day over the last two weeks?"
* "Top ten merchants by declined card volume this month."
