Redshift
How to configure Amazon Redshift as a destination in Mage to write data into Redshift tables using user credentials or IAM-based authentication.
Overview
Use Amazon Redshift as a destination in Mage to export pipeline data into a highly scalable, cloud-based data warehouse. Mage supports both standard username/password authentication and IAM database authentication using AWS access keys.
Mage will automatically create and write to the specified table, with support for optional schema management and merge-based updates.
Configuration Parameters
You must provide the following credentials when configuring Redshift as a destination:
Key | Description | Example Value | Required |
---|---|---|---|
database | Name of the Redshift database where data will be written. | demo | ✅ |
host | Hostname of the Redshift cluster endpoint. | mage-prod.3.us-west-2.redshift.amazonaws.com | ✅ |
port | Redshift port (default is 5439 ). | 5439 | ✅ |
user | Redshift username with access to the database and schema. | awsuser | ✅ (if not using IAM) |
password | Password for the Redshift user. | abc123... | ✅ (if not using IAM) |
schema | Schema within the database where the table will be created or written to. | public | ✅ |
table | Name of the destination table to store data from your pipeline. | dim_users_v1 | ✅ |
region | AWS region where the Redshift cluster is hosted. | us-west-2 | ✅ |
use_merge_load | If true , Mage will attempt to merge incoming data with existing records (UPSERT-like behavior). | false (default) | ❌ |
IAM-Based Authentication (Alternative to User/Password)
If you prefer to use IAM credentials instead of traditional authentication, you can use the following fields:
Key | Description | Example Value | Required (if using IAM) |
---|---|---|---|
access_key_id | AWS access key ID for an IAM user or role with Redshift database access. | AKIA... | ✅ |
secret_access_key | AWS secret access key corresponding to the above access key ID. | xyz123... | ✅ |
cluster_identifier | Identifier of the Amazon Redshift cluster. | mage-prod | ✅ |
db_user | IAM-authenticated Redshift user. | admin | ✅ |
Optional Parameters
Key | Description | Example Value |
---|---|---|
skip_schema_creation | If true , Mage will skip running the CREATE SCHEMA command. Useful if the schema already exists. See issue | true |
lower_case | If true , Mage will automatically convert column names to lowercase. Default is true . | true |
Grant Permissions
To allow Mage to create schemas and insert data, grant the following permissions to your Redshift user or IAM role:
Refer to the Redshift GRANT command documentation for details.