Skip to main content

Tasks

Execute SQL scripts in your warehouse, with support for dbt projects, Lambda functions, and more coming soon.

Overview

Tasks allow you to run custom logic directly in your data warehouse. Currently, tasks execute SQL scripts for transformations, aggregations, data quality checks, or any custom operations on your data.

Task types:

  • SQL Script (Available now) - Execute SQL statements in your warehouse
  • Snowflake dbt (Coming soon) - Run dbt projects directly in Snowflake
  • dbt Cloud (Coming soon) - Trigger dbt Cloud jobs via API
  • AWS Lambda (Coming soon) - Invoke Lambda functions
  • Apache Airflow (Coming soon) - Trigger Airflow DAGs

Common use cases:

  • Calculate lead scores after ingesting from Salesforce
  • Aggregate event data into summary tables
  • Run data quality checks and log anomalies
  • Transform raw data into analytics-ready tables

Prerequisites: At least one active warehouse datasource (Snowflake, BigQuery, PostgreSQL, etc.).

To access: Navigate to Tasks in the sidebar, then click + Create Task.


Creating a Task

To start:

  1. Navigate to Tasks in the sidebar
  2. Click + Create Task
  3. The task creation flow opens with 3 steps:

Step 1: Select Task Type

Select SQL Script from the task type grid. Other task types (Snowflake dbt, dbt Cloud, AWS Lambda, Apache Airflow) are coming soon.

To proceed: Click the SQL Script card.


Step 2: Write & Test SQL

Write your SQL script and test it before proceeding.

  1. Select datasource from the dropdown (shows database, schema, and warehouse info)
  2. Write SQL in the editor with syntax highlighting
  3. Click Run to test your SQL
  4. Verify success - Results section will show execution status

Important: The Next button is only enabled after your SQL executes successfully. You must test your SQL before you can proceed.

What happens when you click Run:

  • Task is saved in draft state
  • SQL executes against the selected datasource
  • If successful: Task transitions to active state
  • If failed: Task remains in draft state

Note: If you abort the flow without clicking Next, the task remains saved in whatever state it's in (draft or active). You'll see it in the tasks list and can edit or delete it later.

To proceed: Click Next after successful execution.


Step 3: Name & Save

Provide a name and optionally add a description.

Task Name (required): Descriptive name for your task (e.g., "Enrich Leads")

API Name (required): Lowercase identifier for API calls and orchestrations (e.g., enrich_leads)

Description (optional): Add notes about what this task does

To create: Click Save Task.


Running a Task

To run manually:

  1. Navigate to Tasks in the sidebar
  2. Find your task in the tasks list
  3. Click the ••• menu → Run Task

The task executes immediately and creates an activity.


Managing Tasks

The tasks list shows all your tasks with columns for NAME, TYPE, DATASOURCE, LAST RUN, and STATE. Click the three-dot menu (•••) on any task row to access management options.

Edit

Modify SQL script, datasource, task name, or description.

To edit: Click •••Edit

You'll be redirected to the task editor where you can modify any settings. Click Run to test changes, then Save to apply updates.

Run Task

Manually execute the task.

To run: Click •••Run Task

The task runs immediately and creates an activity. This is useful for testing or running tasks on-demand outside of orchestrations.

Delete

Permanently remove the task.

To delete: Click •••Delete

⚠️ Warning:

  • Deletion is permanent and cannot be undone
  • Ensure the task is not used in active orchestrations before deleting

Task States

Tasks can be in one of three states:

StateDescriptionHow It Happens
draftTask saved but SQL hasn't run successfully yetCreated when you click Run before SQL succeeds, or when SQL execution fails
activeTask tested and ready to use in orchestrationsSQL executed successfully
inactiveTask disabled by userYou clicked Disable from the menu

State transitions:

  • Clicking Run in the SQL editor saves the task in draft state
  • Successful SQL execution transitions the task to active state
  • Failed SQL execution keeps the task in draft state
  • You can disable an active task to make it inactive

Note: Draft tasks appear in your tasks list even if you didn't complete the wizard. You can edit, run, or delete them anytime.


Troubleshooting

SQL Execution Fails

Problem: Task shows failed status.

Solution: Review the error message. Common causes include syntax errors, permission issues, missing tables, or timeouts. Test SQL in your warehouse query editor first to verify it runs successfully.

Next Button Disabled

Problem: Cannot proceed from SQL editor step.

Solution: The Next button is only enabled after SQL executes successfully. Click Run to test your SQL and verify it completes without errors.

Task Won't Save

Problem: Cannot save task.

Solution: Ensure task name is not empty, API name is unique within the workspace, and datasource is still active.

Task Used in Orchestration

Problem: Want to delete a task but unsure if it's being used.

Solution: Check Orchestrations page to see if the task is used in any orchestrations. Remove it from orchestrations before deleting.



Support

Need help? Contact us at support@supa-flow.io