# Redshift

## How does Rasgo work with Redshift?

Rasgo is a metadata-only product, meaning all of your actual data stay in your data warehouse and Rasgo queries it there via dynamically generating SQL.

Rasgo performs reads-only operations in your Redshift env:

* Rasgo reads the information schema for tables and columns it has access to
* Rasgo dynamically generates and executes SQL on behalf of the user to analyze data

## Connecting to Redshift

#### IP Restrictions

Rasgo will always connect to your account from these IP addresses. Make sure to whitelist them if you have networking restrictions enabled in AWS.

| IP Address   |
| ------------ |
| 54.84.138.60 |
| 54.84.66.109 |

### Credentials

Rasgo needs service credentials to authenticate and execute SQL queries in your account.

When connecting Rasgo to your Redshift account, you'll need to provide this info:

| Field    | Description                                | Example                                         |
| -------- | ------------------------------------------ | ----------------------------------------------- |
| Database | Database to create new views and tables in | RASGO                                           |
| Schema   | Schema to create new views and tables in   | PUBLIC                                          |
| Host     | Connection string                          | my-cluster.abc.us-east-2.redshift.amazonaws.com |
| User     | Redshift username                          | RASGO\_USER                                     |
| Password | Redshift password                          | i<3rasgo                                        |

### Running Asynchronously&#x20;

Rasgo connects to your Redshift account using AWS's python connector. This limits the response time of individual queries to 30 seconds. If a query does not return results in under 30 seconds, the connection will be terminated and Rasgo will return an error message to the end user.

If your use case requires queries that take longer than 30 seconds, you can configure Rasgo to connect to your Data API to run queries asynchronously. This will require [enabling the API in your AWS account](https://docs.aws.amazon.com/redshift/latest/mgmt/data-api-access.html) and providing an API key in addition to the above service credentials.

### Success!

Configuration is complete! You're ready to start using Rasgo.


---

# 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.rasgoml.com/rasgo-docs/integrations/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.
