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

# Amazon Redshift destination for ELT & CDC

> Configure Amazon Redshift as a destination in Integrate.io ELT & CDC. Set up your Redshift cluster to receive replicated data from sources.

## Overview

Integrate.io uses the `COPY` query to sync data from S3 to Redshift using UPSERTS in periodic batches. The data stored temporarily in S3 is removed after it has been synced to Redshift.

## Requirements

* `SUPERUSER` privileges to create sync user and create schema if not exists.

## Create sync user

Let's start by creating a sync user for Integrate.io ELT & CDC. Run the following query,

```bash theme={null}
CREATE USER flydata PASSWORD '<your_password>';
```

## Grant database privileges

The sync user needs `CREATE` and `TEMPORARY` privileges to create the schema and temporary tables.

Specify the database that you'd like the data to be synced to and run the following query to grant the privileges to the user on that database,

```bash theme={null}
GRANT CREATE ON DATABASE <database_name> TO flydata;
GRANT TEMPORARY ON DATABASE <database_name> TO flydata;
```

## Grant schema privileges

The sync user needs `USAGE` and `CREATE` privileges to create the tables in the schema.

Specify the schema that you'd like the data to be synced to and run the following query to grant the privileges to the user on that schema,

```bash theme={null}
CREATE SCHEMA IF NOT EXISTS <schema_name>;
GRANT USAGE ON SCHEMA <schema_name> TO flydata;
GRANT CREATE ON SCHEMA <schema_name> TO flydata;
```

<Note>
  **Note:**

  If you want to store your logs in your own S3 bucket when syncing from your source to redshift, refer to this [guide](/cdc/configure-your-own-s3-bucket-for-redshift-sync).
</Note>

### Required Privileges

| Name                 | Description                                                                                                                                                                                                                              | Enforced? | Reference                                                                                                                   |
| :------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------- | :-------------------------------------------------------------------------------------------------------------------------- |
| CREATE (Database)    | For databases, CREATE allows users to create schemas within the database.  <br /><br />    Required for creating database if it doesn’t exist.                                                                                           | ✅         | [https://docs.aws.amazon.com/redshift/latest/dg/r\_GRANT.html](https://docs.aws.amazon.com/redshift/latest/dg/r_GRANT.html) |
| TEMPORARY (Database) | Grants the permission to create temporary tables in the specified database.  <br /><br />      Required for deduplication.                                                                                                               | ✅         | [https://docs.aws.amazon.com/redshift/latest/dg/r\_GRANT.html](https://docs.aws.amazon.com/redshift/latest/dg/r_GRANT.html) |
| CREATE (Schema)      | For schemas, CREATE allows users to create objects within a schema. To rename an object, the user must have the CREATE permission and own the object to be renamed.  <br /><br />      Required for creating schema if it doesn’t exist. | ✅         | [https://docs.aws.amazon.com/redshift/latest/dg/r\_GRANT.html](https://docs.aws.amazon.com/redshift/latest/dg/r_GRANT.html) |
| USAGE (Schema)       | Grants USAGE permission on a specific schema, which makes objects in that schema accessible to users.  <br /><br />      Required for replication.                                                                                       | ✅         | [https://docs.aws.amazon.com/redshift/latest/dg/r\_GRANT.html](https://docs.aws.amazon.com/redshift/latest/dg/r_GRANT.html) |

## Related

<CardGroup cols={2}>
  <Card title="Configure S3 Bucket for Redshift" icon="arrow-right" href="/cdc/configure-your-own-s3-bucket-for-redshift-sync" horizontal />

  <Card title="Data Type Mapping - Redshift" icon="arrow-right" href="/cdc/data-type-mapping-redshift" horizontal />

  <Card title="IP Allowlist" icon="arrow-right" href="/cdc/ip-list" horizontal />

  <Card title="Initial Sync Process" icon="arrow-right" href="/cdc/initial-sync-process" horizontal />
</CardGroup>
