The target-redshift loader sends data into Amazon Redshift after it was pulled from a source using an extractor
Alternate Implementations
Getting Started
Prerequisites
If you haven't already, follow the initial steps of the Getting Started guide:
Installation and configuration
-
Add the target-redshift loader to your
project using
:meltano add
-
Configure the target-redshift
settings using
:meltano config
meltano add loader target-redshift
meltano config target-redshift set --interactive
Next steps
Follow the remaining steps of the Getting Started guide:
If you run into any issues, learn how to get help.
Capabilities
The current capabilities for
target-redshift
may have been automatically set when originally added to the Hub. Please review the
capabilities when using this loader. If you find they are out of date, please
consider updating them by making a pull request to the YAML file that defines the
capabilities for this loader.
This plugin has the following capabilities:
- about
- stream-maps
- schema-flattening
- target-schema
- hard-delete
You can
override these capabilities or specify additional ones
in your meltano.yml
by adding the capabilities
key.
Settings
This target uses boto3 to connect to AWS and perform copy and possibly credential operations. The agent running this target should be connected to AWS to be able to open a boto3 client.
The
target-redshift
settings that are known to Meltano are documented below. To quickly
find the setting you're looking for, click on any setting name from the list:
activate_version
dbname
dialect+driver
host
interpret_content_encoding
password
port
sqlalchemy_url
ssh_tunnel.username
ssl_enable
ssl_mode
user
enable_iam_authentication
cluster_identifier
aws_redshift_copy_role_arn
s3_bucket
s3_key_prefix
remove_s3_files
temp_dir
You can also list these settings using
with the meltano config
list
subcommand:
meltano config target-redshift list
You can
override these settings or specify additional ones
in your meltano.yml
by adding the settings
key.
Please consider adding any settings you have defined locally to this definition on MeltanoHub by making a pull request to the YAML file that defines the settings for this plugin.
Activate Version (activate_version)
-
Environment variable:
TARGET_REDSHIFT_ACTIVATE_VERSION
-
Default Value:
true
If set to false, the tap will ignore activate version messages. If set to true, add_record_metadata must be set to true as well.
Configure this setting directly using the following Meltano command:
meltano config target-redshift set activate_version [value]
Database name (dbname)
-
Environment variable:
TARGET_REDSHIFT_DBNAME
Database name. Note if sqlalchemy_url is set this will be ignored.
Configure this setting directly using the following Meltano command:
meltano config target-redshift set dbname [value]
Dialect+Driver (dialect+driver)
-
Environment variable:
TARGET_REDSHIFT_DIALECT+DRIVER
-
Default Value:
redshift+redshift_connector
Dialect+driver see https://aws.amazon.com/blogs/big-data/use-the-amazon-redshift-sqlalchemy-dialect-to-interact-with-amazon-redshift. Generally just leave this alone. Note if sqlalchemy_url is set this will be ignored.
Configure this setting directly using the following Meltano command:
meltano config target-redshift set dialect+driver [value]
Host (host)
-
Environment variable:
TARGET_REDSHIFT_HOST
Hostname for redshift instance. Note if sqlalchemy_url is set this will be ignored.
Configure this setting directly using the following Meltano command:
meltano config target-redshift set host [value]
Interpret Content Encoding (interpret_content_encoding)
-
Environment variable:
TARGET_REDSHIFT_INTERPRET_CONTENT_ENCODING
-
Default Value:
false
If set to true, the target will interpret the content encoding of the schema to determine how to store the data. Using this option may result in a more efficient storage of the data but may also result in an error if the data is not encoded as expected.
Configure this setting directly using the following Meltano command:
meltano config target-redshift set interpret_content_encoding [value]
Password (password)
-
Environment variable:
TARGET_REDSHIFT_PASSWORD
Password used to authenticate. Note if sqlalchemy_url is set this will be ignored.
Configure this setting directly using the following Meltano command:
meltano config target-redshift set password [value]
Port (port)
-
Environment variable:
TARGET_REDSHIFT_PORT
-
Default Value:
5432
The port on which redshift is awaiting connection. Note if sqlalchemy_url is set this will be ignored.
Configure this setting directly using the following Meltano command:
meltano config target-redshift set port [value]
Sqlalchemy URL (sqlalchemy_url)
-
Environment variable:
TARGET_REDSHIFT_SQLALCHEMY_URL
SQLAlchemy connection string. This will override using host, user, password, port, dialect, and all ssl settings. Note that you must escape password special characters properly. See https://docs.sqlalchemy.org/en/20/core/engines.html#escaping-special-characters-such-as-signs-in-passwords
Configure this setting directly using the following Meltano command:
meltano config target-redshift set sqlalchemy_url [value]
SSH Tunnel Username (ssh_tunnel.username)
-
Environment variable:
TARGET_REDSHIFT_SSH_TUNNEL_USERNAME
Username to connect to bastion host
Configure this setting directly using the following Meltano command:
meltano config target-redshift set ssh_tunnel username [value]
SSL Enable (ssl_enable)
-
Environment variable:
TARGET_REDSHIFT_SSL_ENABLE
-
Default Value:
false
Whether or not to use ssl to verify the server's identity. Use ssl_certificate_authority and ssl_mode for further customization. To use a client certificate to authenticate yourself to the server, use ssl_client_certificate_enable instead. Note if sqlalchemy_url is set this will be ignored.
Configure this setting directly using the following Meltano command:
meltano config target-redshift set ssl_enable [value]
SSL Mode (ssl_mode)
-
Environment variable:
TARGET_REDSHIFT_SSL_MODE
-
Default Value:
verify-full
SSL Protection method. Must be one of disable, allow, prefer, require, verify-ca, or verify-full. Note if sqlalchemy_url is set this will be ignored.
Configure this setting directly using the following Meltano command:
meltano config target-redshift set ssl_mode [value]
User (user)
-
Environment variable:
TARGET_REDSHIFT_USER
User name used to authenticate. Note if sqlalchemy_url is set this will be ignored.
Configure this setting directly using the following Meltano command:
meltano config target-redshift set user [value]
Enable iam authentication (enable_iam_authentication)
-
Environment variable:
TARGET_REDSHIFT_ENABLE_IAM_AUTHENTICATION
-
Default Value:
false
If true, use temporary credentials (https://docs.aws.amazon.com/redshift/latest/mgmt/generating-iam-credentials-cli-api.html). Note if sqlalchemy_url is set this will be ignored.
Configure this setting directly using the following Meltano command:
meltano config target-redshift set enable_iam_authentication [value]
Cluster identifier (cluster_identifier)
-
Environment variable:
TARGET_REDSHIFT_CLUSTER_IDENTIFIER
Redshift cluster identifier. Note if sqlalchemy_url is set or enable_iam_authentication is false this will be ignored.
Configure this setting directly using the following Meltano command:
meltano config target-redshift set cluster_identifier [value]
AWS redshift copy role arn (aws_redshift_copy_role_arn)
-
Environment variable:
TARGET_REDSHIFT_AWS_REDSHIFT_COPY_ROLE_ARN
Redshift copy role arn to use for the COPY command from s3.
Configure this setting directly using the following Meltano command:
meltano config target-redshift set aws_redshift_copy_role_arn [value]
S3 bucket (s3_bucket)
-
Environment variable:
TARGET_REDSHIFT_S3_BUCKET
S3 bucket to save staging files before using COPY command.
Configure this setting directly using the following Meltano command:
meltano config target-redshift set s3_bucket [value]
S3 key prefix (s3_key_prefix)
-
Environment variable:
TARGET_REDSHIFT_S3_KEY_PREFIX
S3 key prefix to save staging files before using COPY command.
Configure this setting directly using the following Meltano command:
meltano config target-redshift set s3_key_prefix [value]
Remove S3 files (remove_s3_files)
-
Environment variable:
TARGET_REDSHIFT_REMOVE_S3_FILES
-
Default Value:
true
If you want to remove staging files in S3.
Configure this setting directly using the following Meltano command:
meltano config target-redshift set remove_s3_files [value]
Temp dir (temp_dir)
-
Environment variable:
TARGET_REDSHIFT_TEMP_DIR
-
Default Value:
.meltano/temp
Where you want to store your staging files locally.
Configure this setting directly using the following Meltano command:
meltano config target-redshift set temp_dir [value]
Expand To Show SDK Settings
Add Record Metadata (add_record_metadata)
-
Environment variable:
TARGET_REDSHIFT_ADD_RECORD_METADATA
-
Default Value:
true
Note that this must be enabled for activate_version to work!This adds _sdc_extracted_at, _sdc_batched_at, and more to every table. See https://sdk.meltano.com/en/latest/implementation/record_metadata.html for more information.
Configure this setting directly using the following Meltano command:
meltano config target-redshift set add_record_metadata [value]
Default Target Schema (default_target_schema)
-
Environment variable:
TARGET_REDSHIFT_DEFAULT_TARGET_SCHEMA
-
Default Value:
$MELTANO_EXTRACT__LOAD_SCHEMA
Redshift schema to send data to, example: tap-clickup
Configure this setting directly using the following Meltano command:
meltano config target-redshift set default_target_schema [value]
Flattening Enabled (flattening_enabled)
-
Environment variable:
TARGET_REDSHIFT_FLATTENING_ENABLED
'True' to enable schema flattening and automatically expand nested properties.
Configure this setting directly using the following Meltano command:
meltano config target-redshift set flattening_enabled [value]
Flattening Max Depth (flattening_max_depth)
-
Environment variable:
TARGET_REDSHIFT_FLATTENING_MAX_DEPTH
The max depth to flatten schemas.
Configure this setting directly using the following Meltano command:
meltano config target-redshift set flattening_max_depth [value]
Hard Delete (hard_delete)
-
Environment variable:
TARGET_REDSHIFT_HARD_DELETE
-
Default Value:
false
When activate version is sent from a tap this specefies if we should delete the records that don't match, or mark them with a date in the _sdc_deleted_at
column. This config option is ignored if activate_version
is set to false.
Configure this setting directly using the following Meltano command:
meltano config target-redshift set hard_delete [value]
Stream Map Config (stream_map_config)
-
Environment variable:
TARGET_REDSHIFT_STREAM_MAP_CONFIG
User-defined config values to be used within map expressions.
Configure this setting directly using the following Meltano command:
meltano config target-redshift set stream_map_config [value]
Stream Maps (stream_maps)
-
Environment variable:
TARGET_REDSHIFT_STREAM_MAPS
Config object for stream maps capability. For more information check out Stream Maps.
Configure this setting directly using the following Meltano command:
meltano config target-redshift set stream_maps [value]
Something missing?
This page is generated from a YAML file that you can contribute changes to.
Edit it on GitHub!Looking for help?
#plugins-general
channel.