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:Note:use_s3_copyandtype_mappingare Mage Pro-only features.use_s3_copyenables faster bulk loads via S3 and supports IAM roles or access key authentication.
IAM-Based Authentication (Alternative to User/Password)
If you prefer to use IAM credentials instead of traditional authentication, you can use the following fields:S3 Configuration (Required if use_s3_copy is true)
Configure these inside a nested
s3_creds config object:
Type Mapping
Thetype_mapping configuration allows you to override default column type conversions. This is useful for advanced cases like storing JSON in Redshift’s SUPER type or adjusting column widths.
Example Configuration
YAML Format:Supported Overrides
object→ Redshift type for JSON objects (e.g.,SUPER)array→ Redshift type for JSON arrays (e.g.,SUPER)string→ Custom VARCHAR or other string typedatetime→ Custom timestamp type (e.g.,TIMESTAMPTZ)number→ Custom numeric type (e.g.,BIGINT)
When usingSUPER, Mage automatically appliesJSON_PARSE()for correct Redshift insertion.