Breadcrumbs

Amazon Redshift - Upload File to Table from Workflows

Amazon Redshift Template - Upload File to Table from Workflows

template

amazon redshift

Information about Alli Workflows' low-code Amazon Redshift Upload File to Table from Workflows template. Upload a CSV file to any table in Amazon Redshift.

Amazon Redshift - Upload File to Table from Workflows

Overview

Upload a CSV file to any table in Amazon Redshift. With the file data, you can create a new table, overwrite the existing table, or append to the end of the table. **Note:** This Vessel cannot be used to upload a local file from your computer. **Recommended Setup:** 1. A Vessel built with this Blueprint should typically run after a Vessel that either downloads a file to Workflows or generates a file with code.

Variables

Name

Reference

Type

Required

Default

Options

Description

Host

REDSHIFT_HOST

Alphanumeric

None

-

The domain or the IP address of the database you want to connect to.

Port

REDSHIFT_PORT

Integer

"5439"

-

Port number where the database accepts inbound connections

Username

REDSHIFT_USERNAME

Alphanumeric

None

-

Username configured as part of the database credentials. See Authorization documentation for more information.

Password

REDSHIFT_PASSWORD

Password

None

-

Password for the provided username

Database

REDSHIFT_DATABASE

Alphanumeric

None

-

Name of the database to connect to.

Extra URL Parameters

REDSHIFT_URL_PARAMETERS

Alphanumeric

None

-

Extra parameters that will be placed at the end of the connection string, after the "?". Must be separated by "&"

Workflows Folder Name

REDSHIFT_SOURCE_FOLDER_NAME

Alphanumeric

None

-

Folder where the file to upload can be found. Leaving blank will search in the current working directory.

Workflows File Name Match Type

REDSHIFT_SOURCE_FILE_NAME_MATCH_TYPE

Select

exact_match

Exact Match: exact_match

Regex Match: regex_match

Determines if the text in "File Name" will match to one or multiple files.

Workflows File Name

REDSHIFT_SOURCE_FILE_NAME

Alphanumeric

None

-

Name of the file to upload to the specified table

Table Name

REDSHIFT_TABLE_NAME

Alphanumeric

None

-

Name of the table where you want data inserted

Insertion Method

REDSHIFT_INSERT_METHOD

Select

append

Append Data: append

Replace Data: replace

Determines how the data in your file will be added to the table

Schema

REDSHIFT_SCHEMA

Alphanumeric

-

-

The schema to establish a connection with; if omitted this will default to public.

YAML

Below is the YAML template

YAML

source:
  blueprint: Amazon Redshift - Upload File to Table from Workflows
  inputs:
    REDSHIFT_HOST: null  ## REQUIRED
    REDSHIFT_PORT: '5439' ## REQUIRED
    REDSHIFT_USERNAME: null ## REQUIRED
    REDSHIFT_PASSWORD: null
    REDSHIFT_DATABASE: null  ## REQUIRED
    REDSHIFT_URL_PARAMETERS: null
    REDSHIFT_SOURCE_FOLDER_NAME: null
    REDSHIFT_SOURCE_FILE_NAME_MATCH_TYPE: exact_match ## REQUIRED
    REDSHIFT_SOURCE_FILE_NAME: null ## REQUIRED
    REDSHIFT_TABLE_NAME: null ## REQUIRED
    REDSHIFT_INSERT_METHOD: append ## REQUIRED
    REDSHIFT_SCHEMA: null
  type: BLUEPRINT
guardrails:
  retry_count: 1
  retry_wait: 0h0m0s
  runtime_cutoff: 1h0m0s
  exclude_exit_code_ranges:
    - '200'
    - '220'
    - '249'