Add monitoring-sql-warehouse asset#11
Merged
Merged
Conversation
Drop-in DABs SQL warehouse tuned for scheduled Databricks Alerts and monitoring queries: 2X-Small serverless PRO with auto_stop_mins=1, the serverless minimum verified end-to-end via DABs deploy. Keeps cost proportional to actual query time instead of warm-up dwell. The asset installs one resource YAML under <target_dir>/<key>.sql_warehouse.yml (default resources/, picked up by the conventional resources/*.yml glob without any databricks.yml change) and an in-bundle usage doc at docs/monitoring-sql-warehouse/README.md covering the serverless 1-minute nuance, cross-resource reference pattern, and CLI/API paths for editing warehouses created outside DABs (with citations to the Create / Edit Warehouse API references and a worked curl example). Five prompts with safe defaults (target_dir, warehouse_resource_key, warehouse_name, cluster_size, auto_stop_mins); pattern-validated against the official cluster sizes (2X-Small through 5X-Large) and integer-only auto-stop values. Resource ships with channel pinned to CHANNEL_NAME_CURRENT so Databricks SQL Preview-channel rollouts cannot drift query behavior, and two cost-attribution tags (workload=monitoring-alerts, created_by=dabs-asset/monitoring-sql-warehouse) for traceability in usage reports. Asset-specific tests assert the exact installed file set, YAML parse, the proven serverless-PRO config (warehouse_type=PRO, enable_serverless_compute=true, auto_stop_mins integer-serialized, channel pinned to CHANNEL_NAME_CURRENT), both cost-attribution tags, and that custom warehouse_resource_key / target_dir / auto_stop_mins values flow into both the filename and the rendered YAML. Tagged for release as v1.8.0 in CHANGELOG.md.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds the third asset in the library:
monitoring-sql-warehouse. A drop-in DABs SQL warehouse resource tuned for scheduled Databricks Alerts and monitoring queries (2X-Small serverless PRO withauto_stop_mins: 1). Keeps cost proportional to actual query time instead of warm-up dwell, which is what happens when sub-second Alert queries run on a general-purpose warehouse with a long auto-stop window.The
auto_stop_mins: 1value was verified end-to-end against a real workspace (Databricks SQL channel v2026.10): the UI shows "After 1 minute of inactivity" after deploy. Sub-minute values are not supported (the field is integer-only;0.5triggers a CLI integer-coercion warning and the workspace silently reverts to the platform default of 120 min).0disables auto-stop entirely.Changes
assets/monitoring-sql-warehouse/with schema, top-level README, in-bundle usage doc (docs/monitoring-sql-warehouse/README.md), and the warehouse YAML templateCHANNEL_NAME_CURRENTso Databricks SQL Preview-channel rollouts cannot drift query behavior, plus two cost-attribution tags (workload=monitoring-alerts,created_by=dabs-asset/monitoring-sql-warehouse)target_dir,warehouse_resource_key,warehouse_name,cluster_size,auto_stop_mins) with safe defaults; pattern-validated against the nine official cluster sizes (2X-Smallthrough5X-Large) and integer-only auto-stop valuesauto_stop_minscontract, with a workedcurlexample for editing existing warehouses outside DABstests/assets/test_monitoring_sql_warehouse.py(9 tests): exact installed file set, YAML parse, proven serverless-PRO config (warehouse_type=PRO,enable_serverless_compute=true, integer-serializedauto_stop_mins, channel pin), both cost-attribution tags, and that customwarehouse_resource_key/target_dir/auto_stop_minsvalues flow into both the filename and the rendered YAMLtests/configs/assets/monitoring_sql_warehouse.jsonASSETS.mdcatalog row addedCHANGELOG.mdcut asv1.8.0ROADMAP.md"Shipped" list updated to include bothdbx-ro-query(was missing) andmonitoring-sql-warehouseChange Area
template/, schema, helpers)assets/<name>/)Configuration Axes Affected
databricks_template_schema.json)library/helpers.tmpl)Testing
pytest tests/ -V) — 2333 passed, 163 skipped (+9 new asset tests, +4 framework parametrizations from the new asset auto-discovery)databricks bundle init ./assets/monitoring-sql-warehouse --output-dir /tmp/... --config-file tests/configs/assets/monitoring_sql_warehouse.json)Asset Changes
databricks bundle init . --template-dir assets/monitoring-sql-warehouse --output-dir <dir>library/helpers.tmplor other assets)tests/configs/assets/monitoring_sql_warehouse.jsonaddedChecklist
{{ }}blocks).tmplfiles appear in generated output (asserted bytest_no_tmpl_leftovers)test_warehouse_yaml_parses)