Tasks
Run SQL scripts and Snowflake Python code in your warehouse, then schedule them or add them to orchestrations.
Overview
Tasks let you run custom logic directly in your data warehouse. Each task type has its own editor and runtime, while task testing, states, manual runs, schedules, and orchestrations work consistently across types.
Available task types:
- SQL Script - Execute SQL statements on any datasource that supports SQL task execution
- Python Task - Execute Python code on a Snowflake datasource using Snowflake-managed serverless compute
Separate task types that are not yet available:
- Snowflake dbt - A future Snowflake-specific dbt task type
- dbt Cloud - A future task type for dbt Cloud jobs
- AWS Lambda - Invoke Lambda functions
- Apache Airflow - Trigger Airflow DAGs
dbt Core is available now through transformation projects. Run dbt commands from the project for development, or add the transformation project to an orchestration with ingestion and activation pipelines. The disabled Snowflake dbt and dbt Cloud task cards are separate integrations.
Common use cases:
- Calculate lead scores after ingesting from Salesforce
- Aggregate event data into summary tables
- Run data quality checks and log anomalies
- Build Snowpark transformations that are easier to express in Python
- Transform raw data into analytics-ready tables
Prerequisites: An active datasource that supports the selected task type. Review the SQL Script prerequisites or Python Task prerequisites before creating a task.
To access: Navigate to Tasks in the sidebar, then click + Create Task.
Creating a Task
To start:
- Navigate to Tasks in the sidebar
- Click + Create Task
- The task creation flow opens with 3 steps
Step 1: Select Task Type
Select the task type you want to create:
- SQL Script for SQL statements, transformations, maintenance, or stored procedure calls
- Python Task for Python code that runs in Snowflake with a Snowpark session
The remaining task types are marked Coming soon and cannot be selected. To run dbt Core today, create a transformation project.
Step 2: Write and Test the Task
Every task must run successfully before you can continue.
- Select a datasource from the dropdown
- Configure the task using the fields for the selected task type
- Write your code in the editor
- Click Run to test the task
- Verify success in the Result panel
Follow the task-type guide for editor fields, runtime behavior, and troubleshooting:
The Next button is enabled only after the current code and configuration complete successfully. If you change the code, datasource, or type-specific configuration after a successful test, run the task again before continuing.
What happens when you click Run:
- The task is saved in
draftstate - The code executes against the selected datasource
- If successful, the task transitions to
activestate - If unsuccessful, the task remains in
draftstate
Note: If you leave the flow without clicking Next, the task remains saved in its current state. You can edit or delete it from the tasks list later.
To proceed: Click Next after a successful run.
Step 3: Name and Save
Provide a name and optionally add a description.
Task Name (required): Descriptive name for your task, such as "Enrich Leads"
API Name (required): Lowercase identifier for API calls and orchestrations, such as enrich_leads
Description (optional): Add notes about what this task does
To create: Click Save Task.
Running a Task
To run manually:
- Navigate to Tasks in the sidebar
- Find your task in the tasks list
- Click the ••• menu, then select Run Task
The task starts immediately and creates an activity.
You can also add an active task to an orchestration or assign it to a schedule.
To monitor execution: Navigate to Activities. Task runs currently show summary status in the activities list and do not open a separate detail page. Python logs are available in the task editor when you test the code.
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 the code, datasource, task name, or description. Type-specific fields are also available in the editor.
To edit: Click ••• and select Edit.
Run the updated task successfully, then click Save to apply the changes.
Run Task
Manually execute an active task.
To run: Click ••• and select Run Task.
The task starts immediately and creates an activity. Use this option for on-demand runs outside orchestrations and schedules.
Delete
Permanently remove the task.
To delete: Click ••• and select Delete.
Warning:
- Deletion is permanent and cannot be undone
- Remove the task from active orchestrations and schedules before deleting it
Task States
Tasks created in the app move between two states:
| State | Description | How It Happens |
|---|---|---|
| draft | Task saved but the current code has not run successfully | Created before the first successful run or restored after a failed test |
| active | Task tested and ready for manual, scheduled, or orchestrated runs | Current code completed successfully |
State transitions:
- Clicking Run in the editor saves the task in
draftstate before execution - Successful execution transitions the task to
activestate - Failed, cancelled, or timed-out execution keeps the task in
draftstate
Draft tasks remain in the tasks list even if you do not finish the creation flow. You can edit, run, or delete them at any time.
Troubleshooting
For runtime-specific errors, see SQL Script troubleshooting or Python Task troubleshooting.
Next Button Disabled
Problem: Cannot proceed from the editor step.
Solution: Click Run and wait for the current code and configuration to complete successfully. Any change to the datasource, code, or type-specific configuration requires another successful test.
Task Will Not Save
Problem: Cannot save task.
Solution: Ensure the task name is not empty, the API name is unique within the workspace, and the datasource is still active.
Task Used in an Orchestration or Schedule
Problem: You want to delete a task but are unsure where it is used.
Solution: Check Orchestrations and Schedules for references to the task. Remove those references before deleting it.
Related Pages
- SQL Script Tasks - Run SQL statements and stored procedures
- Python Tasks - Run Snowpark Python code in Snowflake
- Snowflake Destination - Configure Snowflake and Python task permissions
- Orchestrations - Chain tasks with pipelines
- Activities - View task execution history
- Schedules - Automate task and orchestration runs
Support
Need help? Contact us at support@supa-flow.io