Skip to main content

Amazon Redshift - Execute Query

Overview​

Execute any SQL query against your Redshift database. Perfect for creating multi-step SQL jobs, executing DML statements, or running scheduled queries.

Variables​

NameReferenceTypeRequiredDefaultOptionsDescription
HostREDSHIFT_HOSTAlphanumericβœ…--The domain or the IP address of the database you want to connect to.
PortREDSHIFT_PORTIntegerβœ…"5439"-Port number where the database accepts inbound connections.
UsernameREDSHIFT_USERNAMEAlphanumericβœ…--Username configured as part of the database credentials. See Authorization documentation for more information.
PasswordREDSHIFT_PASSWORDPasswordβž–--Password for the provided username
DatabaseREDSHIFT_DATABASEAlphanumericβœ…--Name of the database that you want to connect to
Extra URL ParametersREDSHIFT_URL_PARAMETERSAlphanumericβž–--Extra parameters that will be placed at the end of the connection string, after the "?". Must be separated by "&"
QueryREDSHIFT_QUERYAlphanumericβœ…--Any SQL query that runs a job against the database (CREATE, DROP, INSERT, etc.). Formatting is ignored

YAML​

Below is the YAML template for this Blueprint and can be used in the Fleet YAML Editor.

source:
blueprint: Amazon Redshift - Execute Query
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_QUERY: null ## REQUIRED
type: BLUEPRINT
guardrails:
retry_count: 1
retry_wait: 0h0m0s
runtime_cutoff: 1h0m0s
exclude_exit_code_ranges:
- '200'
- '221'
- '249'