The target-redshift Singer target sends data into Redshift after it was pulled from a source using a Singer tap.

Standalone usage

Install the package using pip:

pip install pipelinewise-target-redshift

For additional instructions, refer to the README in the repository.

Usage with Meltano

Install Meltano, create your Meltano project, and add the target to your project as a loader:

meltano add loader target-redshift

For additional instructions, refer to the Meltano-specific documentation for target-redshift.




Redshift host


  • Default: 5439

Redshift port

Database Name (dbname)

Redshift database name

User name (user)

Redshift user name


Redshift password

S3 Bucket name (s3_bucket)

AWS S3 bucket name


Name of the schema where the tables will be created. If schema_mapping is not defined then every stream sent by the tap is loaded into this schema.

AWS profile name (aws_profile)

AWS profile name for profile based authentication. If not provided, AWS_PROFILE environment variable will be used.

AWS S3 Access Key ID (aws_access_key_id)

S3 Access Key Id. Used for S3 and Redshift copy operations. If not provided, AWS_ACCESS_KEY_ID environment variable will be used.

AWS S3 Secret Access Key (aws_secret_access_key)

S3 Secret Access Key. Used for S3 and Redshift copy operations. If not provided, AWS_SECRET_ACCESS_KEY environment variable will be used.

AWS S3 Session Token (aws_session_token)

S3 AWS STS token for temporary credentials. If not provided, AWS_SESSION_TOKEN environment variable will be used.

AWS Redshift COPY role ARN (aws_redshift_copy_role_arn)

AWS Role ARN to be used for the Redshift COPY operation. Used instead of the given AWS keys for the COPY operation if provided - the keys are still used for other S3 operations

AWS S3 ACL (s3_acl)

S3 Object ACL

S3 Key Prefix (s3_key_prefix)

A static prefix before the generated S3 key names. Using prefixes you can upload files into specific directories in the S3 bucket. Default(None)

COPY options (copy_options)


Parameters to use in the COPY command when loading data to Redshift. Some basic file formatting parameters are fixed values and not recommended overriding them by custom values. They are like: CSV GZIP DELIMITER ',' REMOVEQUOTES ESCAPE.


  • Default: 100000

Maximum number of rows in each batch. At the end of each batch, the rows in the batch are loaded into Redshift.


  • Default: false

Flush and load every stream into Redshift when one batch is full. Warning - This may trigger the COPY command to use files with low number of records, and may cause performance problems.


  • Default: 0

The number of threads used to flush tables. 0 will create a thread for each stream, up to parallelism_max. -1 will create a thread for each CPU core. Any other positive number will create that number of threads, up to parallelism_max.


  • Default: 16

Max number of parallel threads to use when flushing tables.


Grant USAGE privilege on newly created schemas and grant SELECT privilege on newly created tables to a specific list of users or groups. If schema_mapping is not defined then every stream sent by the tap is granted accordingly.


Useful if you want to load multiple streams from one tap to multiple Redshift schemas. If the tap sends the stream_id in - format then this option overwrites the default_target_schema value. Note, that using schema_mapping you can overwrite the default_target_schema_select_permissions value to grant SELECT permissions to different groups per schemas or optionally you can create indices automatically for the replicated tables.


  • Default: false

By default the connector caches the available table structures in Redshift at startup. In this way it doesn’t need to run additional queries when ingesting data to check if altering the target tables is required. With disable_table_cache option you can turn off this caching. You will always see the most recent table structures but will cause an extra query runtime.


  • Default: false

Metadata columns add extra row level information about data ingestions, (i.e. when was the row read in source, when was inserted or deleted in redshift etc.) Metadata columns are creating automatically by adding extra columns to the tables with a column prefix SDC. The metadata columns are documented at Enabling metadata columns will flag the deleted rows by setting the _SDC_DELETED_AT metadata column. Without the add_metadata_columns option the deleted rows from singer taps will not be recongisable in Redshift.


  • Default: false

When hard_delete option is true then DELETE SQL commands will be performed in Redshift to delete rows in tables. It’s achieved by continuously checking the _SDC_DELETED_AT metadata column sent by the singer tap. Due to deleting rows requires metadata columns, hard_delete option automatically enables the add_metadata_columns option as well.


  • Default: 0

Object type RECORD items from taps can be loaded into VARIANT columns as JSON (default) or we can flatten the schema by creating columns automatically. When value is 0 (default) then flattening functionality is turned off.


  • Default: true

Log based and Incremental replications on tables with no Primary Key cause duplicates when merging UPDATE events. When set to true, stop loading data if no Primary Key is defined.


  • Default: false

Validate every single record message to the corresponding JSON schema. This option is disabled by default and invalid RECORD messages will fail only at load time by Redshift. Enabling this option will detect invalid records earlier but could cause performance degradation.


  • Default: false

Do not update existing records when Primary Key is defined. Useful to improve performance when records are immutable, e.g. events


The compression method to use when writing files to S3 and running Redshift COPY.


  • Default: 1

The number of slices to split files into prior to running COPY on Redshift. This should be set to the number of Redshift slices. The number of slices per node depends on the node size of the cluster - run SELECT COUNT(DISTINCT slice) slices FROM stv_slices to calculate this. Defaults to 1.

Temp directory (temp_dir)

(Default: platform-dependent) Directory of temporary CSV files with RECORD messages.

Looking for help?

If you're having trouble getting target-redshift to work by itself or with Meltano, look for an existing issue in its repository, file a new issue, or join the Meltano Slack community and ask for help in the #plugins-general channel.

Found an issue on this page?

This page is generated from a YAML file that you can contribute changes to! It is also validated against a JSON Schema used for taps and targets.

Edit this page on GitLab!