Overview
Amazon Redshift is a cloud data warehouse from Amazon Web Services (AWS) used by organizations to store, query, and analyze large volumes of structured data with SQL.
The Alchemer integration with Amazon Redshift supports automated workflow initiation based on the rows in a Redshift table. The Alchemer Redshift Workflow Initiator allows Alchemer to query a Redshift table on a schedule, find every row that matches the criteria you set, and start a separate workflow run for each matching row, with that row's data available as merge codes in the workflow.
Common uses for the Alchemer Redshift integration
- Send surveys or emails to contacts stored in a Redshift table on a recurring schedule
- Start one workflow run per Redshift row that matches a status, segment, or other column value
- Personalize workflow steps using column values from each Redshift row
- Drive workflow branching or routing using Redshift data
- Reduce manual exports of warehouse data into Alchemer
What can the Alchemer Redshift integration do?
You will need
- AWS authentication (access key ID and secret access key) and the AWS region for your Redshift workgroup. More details in the authentication how-to guide.
- An Alchemer plan that includes integrations with Workflow and the Integration Manager permission enabled.
- Contact us if you are unsure if your plan includes integrations.
Setup Alchemer Redshift integration in Workflow
Redshift | Start workflow from Redshift
You will need:
- AWS authentication (access key ID and secret access key) and region. More details in the authentication how-to guide.
- A Redshift Serverless workgroup, database, schema, and table
- The criteria (column and value pairs) you want to use to select rows
Configure the action
- Open your workflow in Workflow Builder.
- On the Select Initiator pop up select the AWS initiator.
- Select Redshift | Start workflow from Redshift.
- Redshift | Authentication: Select an existing authentication or create a new authentication. Then enter the AWS Region where your Redshift workgroup is located (e.g.
us-east-1). - Redshift | Choose workgroup: Select the Redshift Serverless workgroup you want to use to run the queries.
- Redshift | Choose database: Select the Redshift database from the dropdown.
- Redshift | Choose schema: Select the Redshift schema from the dropdown.
- Redshift | Choose table: Select the Redshift table that contains the rows you want to start workflows from.
- Redshift | Select criteria: Set the criteria used to pull the rows that will start the workflow.
- Select this Redshift column: On the left side of the mapper, select the Redshift column to filter on.
- To equal this value: On the right side of the mapper, type the value the column should match, then select it.
- Select Add a new mapping to add more criteria.
- Selected operator: Choose AND (rows must match all criteria) or OR (rows can match any criteria). The default is AND.
- Row limit: Optionally, set the maximum number of rows that will start a workflow on each run. The default is 100.
- Note: Criteria are exact matches. If you leave a value blank, the criteria matches rows where that column is empty or NULL. If you don't add any criteria, every row in the table (up to the row limit) starts a workflow.
- Redshift | Schedule for runs: Set the schedule for how frequently you want to get the rows from your Redshift table.
- Interval and Time unit: How often the query runs (e.g. every 1 day).
- Start running on and Stop running by: The date range the schedule is active. Each run occurs at the same time of day as the time set in Start running on. Dates and times display in your local time zone.
- Save the action.
Status codes
- 200: Records found. A workflow run was started for each matching row
- 201: The query ran successfully, but no rows matched the criteria. No workflows were started
- 400: The Redshift API returned an error
Testing and Troubleshooting
Testing and Validation
How to test
- Trigger the workflow and monitor individual runs in the Monitor tab.
- Click on each run to view metadata outputs for each Redshift row.
How to verify results
- Set a send email action to yourself with action metadata included.
- Verify that each matching Redshift row generated an independent workflow run.
- Confirm the number of runs matches the number of rows your criteria should return (up to the row limit).
Monitoring Integration Activity
Where to find logs
- Go to Monitor.
- Check the individual workflow steps.
What logs display
- Row data received from Redshift
- Workflow output or returned status
- The query that ran and the Redshift statement ID (for 201 and 400 results)
Troubleshooting
Authentication issues
- Incorrect or expired AWS access key or secret
- Incorrect AWS region (it must match the region of your Redshift workgroup)
- Missing IAM permissions for Redshift Serverless and the Redshift Data API (e.g. listing workgroups, running statements, and reading statement results)
Redshift-specific issues
- No workgroups listed: the integration uses Redshift Serverless workgroups. Provisioned Redshift clusters are not listed
- No rows returned (201): criteria values must exactly match the values in the column
- Query timed out: serverless workgroups can take several minutes to resume from idle. Queries that don't finish within 10 minutes are cancelled, and no workflows are started for that run
API errors
- Redshift validation failures
- Invalid table, schema, or column references
FAQs
What permissions do I need?
Integration Manager in Alchemer and IAM permissions in AWS to access Redshift Serverless and the Redshift Data API.
Integration Manager in Alchemer and IAM permissions in AWS to access Redshift Serverless and the Redshift Data API.
When does the integration run?
On the set schedule.
On the set schedule.
How many workflow runs will start?
One per matching Redshift row, up to the row limit you set (100 by default).
One per matching Redshift row, up to the row limit you set (100 by default).
Why isn't my workflow triggering?
Check the Monitor tab for authentication errors, criteria that don't match any rows, or query timeouts.
Check the Monitor tab for authentication errors, criteria that don't match any rows, or query timeouts.
What if I need additional functionality?
Contact Alchemer Support for enhancement requests.
Contact Alchemer Support for enhancement requests.