# Connect Redshift

[Data warehouse requirements](/data-requirements/warehouse-requirements.md)

1. Connect to your **Redshift Cluster**
2. Execute the following SQL. These commands create a roadway user and grant read and write permissions to the tables (view [Data warehouse requirements](/data-requirements/warehouse-requirements.md)) required by Roadway. Make sure to change the placeholders for the correct database and schema Roadway should use; we do not need access to your entire data warehouse.

```sql
CREATE USER roadway_user PASSWORD <'your_strong_password'>;

GRANT USAGE ON SCHEMA <your_database_name>.<your_schema_name> TO roadway_user;
GRANT CREATE ON SCHEMA <your_database_name>.<your_schema_name> TO roadway_user;
GRANT SELECT, INSERT ON ALL TABLES IN SCHEMA <your_database_name>.<your_schema_name> TO roadway_user;
ALTER DEFAULT PRIVILEGES FOR USER <your_internal_management_user> IN SCHEMA <your_database_name>.<your_schema_name>
GRANT SELECT ON TABLES TO roadway_user;
```

Next you need to Configure Network Accessibility (Using AWS Management Console)

1. Go to AWS Management Console > Redshift and select your cluster
2. Make sure the cluster security settings allow for inbound connections. For this, you can follow [this AWS Tutorial](https://docs.aws.amazon.com/redshift/latest/mgmt/rs-security-group-public-private.html).

Afterwards, share connection credentials with Roadway:

* cluster name / endpoint, e.g. `example_cluster.<account_id>.<your-cluster-region>.redshift-serverless.amazonaws.com`
* database
* schema
* user&#x20;
* password&#x20;
* region, e.g. `us-west-2`
* port (if not provided, we assume the default - `5439` )

We recommend sharing these credentials via [sharing mechanisms](https://support.1password.com/share-items/?mac#share-an-item) in password management systems.


---

# 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.roadwayai.com/implement-roadway/warehouse-native/connect-redshift.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.
