Supports:
- ✅ Models
- ✅ Model sync destination
- ✅ Bulk sync source
- ✅ Bulk sync destination
Connection
Configuration
| Name | Type | Description | Required |
|---|---|---|---|
auth_mode | string | Authentication method How to authenticate with AWS. Defaults to Access Key and Secret. Accepted values: access_key_and_secret ↓, iam_role ↓ | required |
database | string | Database | required |
hostname | string | Hostname | required |
password | string | Password | required |
port | integer | Port | required |
s3_bucket_name | string | S3 bucket name (destinations only) Name of bucket used for staging data load files | optional |
s3_bucket_region | string | S3 bucket region (destinations only) Region of bucket. Note: must match region of redshift server | optional |
ssh | boolean | Connect over SSH tunnel ↓ | optional |
use_bulk_sync_staging_schema | boolean | Use custom bulk sync staging schema ↓ | optional |
username | string | Username | required |
auth_mode
When auth_mode is access_key_and_secret:
| Name | Type | Description | Required |
|---|---|---|---|
aws_access_key_id | string | AWS access key ID (destinations only) Access Key ID with read/write access to a bucket. More info: https://docs.polytomic.com/docs/redshift | optional |
aws_secret_access_key | string | AWS secret access key (destinations only) | optional |
| Read-only property | Type | Description |
|---|---|---|
aws_user | string | User ARN |
{"name": "Redshift connection","type": "redshift","configuration": {"auth_mode": "access_key_and_secret","aws_access_key_id": "AKIAIOSFODNN7EXAMPLE","aws_secret_access_key": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY","database": "mydb","hostname": "mycluster.us-west-2.redshift.amazonaws.com","password": "password","port": 5439,"s3_bucket_name": "my-bucket","s3_bucket_region": "us-west-2","ssh": false,"use_bulk_sync_staging_schema": false,"username": "redshift_user"}}
When auth_mode is iam_role:
| Name | Type | Description | Required |
|---|---|---|---|
iam_role_arn | string | IAM role ARN | required |
| Read-only property | Type | Description |
|---|---|---|
external_id | string | External ID for the IAM role |
{"name": "Redshift connection","type": "redshift","configuration": {"auth_mode": "iam_role","database": "mydb","hostname": "mycluster.us-west-2.redshift.amazonaws.com","iam_role_arn": "","password": "password","port": 5439,"s3_bucket_name": "my-bucket","s3_bucket_region": "us-west-2","ssh": false,"use_bulk_sync_staging_schema": false,"username": "redshift_user"}}
ssh
When ssh is true:
| Name | Type | Description | Required |
|---|---|---|---|
ssh_host | string | SSH host | required |
ssh_port | integer | SSH port | required |
ssh_private_key | string | Private key | required |
ssh_user | string | SSH user | required |
{"name": "Redshift connection","type": "redshift","configuration": {"auth_mode": "access_key_and_secret","aws_access_key_id": "AKIAIOSFODNN7EXAMPLE","aws_secret_access_key": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY","database": "mydb","hostname": "mycluster.us-west-2.redshift.amazonaws.com","password": "password","port": 5439,"s3_bucket_name": "my-bucket","s3_bucket_region": "us-west-2","ssh": true,"ssh_host": "bastion.example.com","ssh_port": 22,"ssh_private_key": "","ssh_user": "root","use_bulk_sync_staging_schema": false,"username": "redshift_user"}}
use_bulk_sync_staging_schema
When use_bulk_sync_staging_schema is true:
| Name | Type | Description | Required |
|---|---|---|---|
bulk_sync_staging_schema | string | Staging schema name | required |
{"name": "Redshift connection","type": "redshift","configuration": {"auth_mode": "access_key_and_secret","aws_access_key_id": "AKIAIOSFODNN7EXAMPLE","aws_secret_access_key": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY","bulk_sync_staging_schema": "","database": "mydb","hostname": "mycluster.us-west-2.redshift.amazonaws.com","password": "password","port": 5439,"s3_bucket_name": "my-bucket","s3_bucket_region": "us-west-2","ssh": false,"use_bulk_sync_staging_schema": true,"username": "redshift_user"}}
Model Sync
Source
Configuration
| Name | Type | Description | Required |
|---|---|---|---|
query | string | optional | |
schema | string | Schema | optional |
table | string | Table | optional |
view | string | View | optional |
Example
{..."configuration": {"query": "SELECT * FROM sampledata.users","schema": "sampledata","table": "users","view": "active_users"}}
Target
Redshift connections may be used as the destination in a model sync.
All targets
Configuration
| Name | Type | Description | Required |
|---|---|---|---|
created_column | string | ’Created at’ timestamp column | optional |
preserve_table_on_resync | boolean | Preserve destination table when resyncing | optional |
updated_column | string | ’Updated at’ timestamp column | optional |
write_record_timestamps | boolean | Write row timestamp metadata | optional |
Example
{..."target": {"configuration": {"created_column": "","preserve_table_on_resync": false,"updated_column": "","write_record_timestamps": false}}}
Target creation
Redshift connections may be used to create a new target for a model sync. The following parameters are required to create a new target:
| NAME | DESCRIPTION | ENUM |
|---|---|---|
| name | Table name | false |
Bulk Sync
Source
Redshift connections may be used as a bulk sync source. No additional configuration options are required.
Destination
Configuration
| Name | Type | Description | Required |
|---|---|---|---|
advanced | object | optional | |
mirror_schemas | boolean | Mirror schemas | optional |
schema | string | Output schema | optional |
Example
{..."destination_configuration": {"advanced": {"empty_strings_null": true,"hard_deletes": false,"initial_execution": "rebuild","table_prefix": "","truncate_existing": false},"mirror_schemas": false,"schema": "schema"}}
Type handling
Destination types
| POLYTOMIC TYPE | REDSHIFT TYPE |
|---|---|
array<> | SUPER |
bigint | BIGINT |
boolean | BOOL |
date | DATE |
datetime | TIMESTAMP |
decimal(precision, scale) | NUMERIC(precision,scale) |
double | FLOAT8 |
int | INTEGER |
json | SUPER |
jsonarray | SUPER |
number | NUMERIC(38,18) |
object{} | SUPER |
single | FLOAT4 |
smallint | SMALLINT |
string | VARCHAR(MAX) |
time | VARCHAR(255) |
Source types
| REDSHIFT TYPE | POLYTOMIC TYPE |
|---|---|
4000 | json |
BIGINT | bigint |
BOOL | boolean |
BOOLEAN | boolean |
BPCHAR | string |
CHAR | string |
CHARACTER | string |
CHARACTER VARYING | string |
DATE | date |
DECIMAL | number |
DECIMAL(precision, scale) | decimal(precision, scale) |
DOUBLE PRECISION | double |
FLOAT | double |
FLOAT4 | single |
FLOAT8 | double |
INT | int |
INT2 | smallint |
INT4 | int |
INT8 | bigint |
INTEGER | int |
NCHAR | string |
NUMERIC | number |
NUMERIC(precision, scale) | decimal(precision, scale) |
NVARCHAR | string |
REAL | single |
SMALLINT | smallint |
STRING | string |
TEXT | string |
TIME | time |
TIME WITH TIME ZONE | time |
TIME WITHOUT TIME ZONE | time |
TIMESTAMP | datetime |
TIMESTAMP WITH TIME ZONE | datetime_tz |
TIMESTAMP WITHOUT TIME ZONE | datetime |
TIMESTAMPTZ | datetime_tz |
TIMETZ | time |
VARCHAR | string |
