Skip to content

Commit ae7bead

Browse files
Add fallback default_catalog property for pydabs template (#4184)
## Changes This adds the `hive_metastore` fallback for the `default_catalog` property of the `pydabs` template. ## Why I asked Claude Code about any template inconsistencies and this is what it cae up with. More contetxg: this fallback value serves as a sentinel that allows pipeline templates to detect non-UC workspace configurations. When `default_catalog` resolves to `hive_metastore`, the pipeline templates comment out the catalog field (which would otherwise be rejected by the DLT API, since it doesn't accept 'hive_metastore' as a catalog name). See the same logic in default-python here: https://github.com/databricks/cli/blob/main/libs/template/templates/default-python/databricks_template_schema.json#L51 ## Testing - Tested template initialization with both UC and non-UC configurations - Ran `make test-update-templates` to regenerate acceptance tests - Verified `make fmt` and `make lint` pass
1 parent 6e6ae46 commit ae7bead

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libs/template/templates/pydabs/databricks_template_schema.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
},
4949
"default_catalog": {
5050
"type": "string",
51-
"default": "{{default_catalog}}",
51+
"default": "{{if eq (default_catalog) \"\"}}hive_metastore{{else}}{{default_catalog}}{{end}}",
5252
"pattern": "^\\w*$",
5353
"pattern_match_failure_message": "Invalid catalog name.",
5454
"description": "Default catalog for any tables created by this project{{if eq (default_catalog) \"\"}} (leave blank when not using Unity Catalog){{end}}",

0 commit comments

Comments
 (0)