- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-23-2026 02:05 AM
Before adding a wrapper script, I'd look at defining the alerts in Python. Bundles accept Python resource definitions next to YAML, and the databricks-bundles package has an Alert resource with query_text. A small loader can read the .sql file and pass its contents in, while the schedule and evaluation config stay where they are.
Two details matter. Resolve the .sql path from the loader module, not from the shell's working dir, and make sure the file ships with the bundle. For env-specific values, I'd read the bundle variables in the loader and substitute them myself, then check the deployed query, rather than assume ${var.*} inside the file gets resolved.
Your query_file request still makes sense. Python support needs CLI 0.275+ and a Python env (uv by default), which a YAML-only project may not want. I haven't tried this in your setup, so I'd check the resolved query for two targets and confirm the deploy still works from the UI you use today.
Docs: https://docs.databricks.com/aws/en/dev-tools/bundles/python