Skip to main content

SQL Script Tasks

Use SQL Script tasks to run SQL statements directly against a supported datasource. SQL tasks are useful for transformations, maintenance, data quality checks, and stored procedure calls.

Prerequisites

You need an active datasource that supports SQL task execution. The connected database user or role must be able to access every object referenced by the script and perform the requested operations.

Creating a SQL Script Task

  1. Navigate to Tasks in the sidebar
  2. Click + Create Task
  3. Select SQL Script
  4. Select an active SQL-capable datasource
  5. Enter the statements you want to execute
  6. Click Run
  7. Verify success in the Result panel
  8. Click Next, name the task, and click Save Task

The datasource summary shows its database, schema, role, and warehouse when available.

Every task must run successfully before you can continue. The Next button is enabled only after the current SQL and datasource complete successfully. If you change the SQL or datasource after a successful test, run the task again before continuing.

Test Results

The Result panel shows whether the test run completed, failed, timed out, or was cancelled.

When you click Run, Supaflow saves the task in draft state and executes the SQL against the selected datasource. A successful test transitions the task to active state. An unsuccessful test keeps it in draft state.

After the task becomes active, you can run it manually, add it to an orchestration, or assign it to a schedule.

Troubleshooting

SQL Execution Fails

Problem: The Result panel shows a failed status.

Solution: Review the database error in the Result panel. Common causes include SQL syntax errors, missing objects, insufficient permissions, or unavailable database features. Test the same statements with the datasource user or role when you need to isolate a permissions or object-access problem.

Next Button Disabled

Problem: You cannot proceed from the editor step.

Solution: Click Run and wait for the current SQL and datasource to complete successfully. Any change to the SQL or datasource requires another successful test.

Datasource Is Not Available

Problem: The datasource you want to use is not listed.

Solution: Confirm that the datasource is active and supports SQL task execution.

For task naming, states, manual runs, editing, and deletion, see Tasks.

Support

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