run-operation command lets you do this by wrapping your SQL in a macro and running it like any other schedule command.
This works with any warehouse connected to Paradime, such as Snowflake, BigQuery, Databricks, or Redshift. The statement runs through your dbt™ connection, so anything the warehouse role or service account behind your connection can execute, the operation can execute.
Prerequisites
- A dbt™ project connected to your Paradime workspace
- A data warehouse connection configured for your scheduler environment
- Permissions on the warehouse role or service account used by your connection to run the statements you need
Create and run a SQL operation
1
Create a macro that wraps your SQL
In your dbt™ project, add a macro that defines the SQL and executes it with The SQL can be any statement your warehouse allows:
run_query():macros/create_customer_snapshot.sql
CREATE OR REPLACE, GRANT, ALTER, DELETE, or warehouse-specific commands like Snowflake’s ALTER PIPE ... REFRESH. The log() call prints a confirmation in the run logs.2
Test the macro from the Code IDE
Before scheduling, run the operation from a terminal in the Code IDE to confirm it works:The statement executes against the warehouse connection of your current environment.
3
Add the command to a Bolt schedule
Create a schedule with the Standard schedule type. Deferred and Turbo CI only apply to state-aware dbt™ builds, so a plain SQL operation always uses Standard.In the Commands section, add:You can run the operation on its own schedule or add it before or after other dbt™ commands in an existing schedule. Commands run in order, so an operation placed after
dbt build only executes when the build succeeds.Pass arguments to your operation
Macros accept arguments, so one macro can serve multiple schedules. Pass values with the--args flag as a YAML string:
macros/grant_select_on_schema.sql
Related resources
Hooks and operational tasks
More
run-operation examples, including refreshing Snowflake pipes and warehouse cleanup.Bolt command settings
All command types available in Bolt schedules.