Last updated
Was this helpful?
Last updated
Was this helpful?
During CI/CD processes, Paradime Turbo CI creates temporary schemas for testing.
The schemas will be dropped automatically on Pull Request merged if:
is your connected Data Warehouse
is your git provider
This macro identifies and drops these schemas on demand by identifying all schemas with prefix paradime_turbo_ci
drop_turbo_ci_schema
macroTo clean up temporary schemas created during CI runs, you can create a custom macro in your dbt™️ project. Here's how:
Navigate to your dbt project's macros
folder
Create a new file called drop_turbo_ci_schema.sql
Add the following code to the file:
The drop_turbo_ci_schema
macro helps clean up temporary schemas created during CI runs, with an optional dry-run mode for safe testing.
dryrun (bool, optional)
True
: Preview DROP commands without executing them
False
: Execute DROP commands and remove schemas
Default: True
(Safe mode)
Set up a scheduled job in Paradime Bolt with the Below:
The template uses one commands that execute our macro and passes the argument dryrun set to false
dbt run-operation drop_turbo_ci_schema --args '{dryrun: false}' --target ci
Type: Scheduled Run (Cron)
Cron Schedule: 0 8 * * 0
(Every Sunday at 8AM UTC)
Email Alerts:
Success: Confirms all schemas were dropped successfully, letting you know your data pipeline is healthy
Failure: Immediately alerts you when the macro fails to drops your Paradime Turbo Ci schema
The above example is based on BigQuery, use to adapt it to other Data Warehouse providers.
For custom command configurations, see documentation.
Schedule Type
Standard
Ensures consistent execution for production workloads in a single environment. Best for regular data pipeline runs
Schedule Name
drop turbo ci schemas
Descriptive name that indicates purpose
Git Branch
main
Uses your default production branch to ensure you're always running the latest approved code