Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## Unreleased

### Fixes

- Fixed `dbt init` failing to parse the adapter's `profile_template.yml`. The `workspace_name` hint's unquoted `Precedence:` text was interpreted as a YAML mapping delimiter; the hint is now quoted so project scaffolding can load the profile template. ([#266](https://github.com/microsoft/dbt-fabricspark/issues/266))

## v1.13.0

### Features
Expand Down
2 changes: 1 addition & 1 deletion src/dbt/include/fabricspark/profile_template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ prompts:
type: 'bool'
default: true
workspace_name:
hint: Optional. Default workspace name for cross-workspace 4-part naming. When set and the target lakehouse has schemas enabled, all relations without an explicit model-level workspace_name will be prefixed with this workspace. Ignored for non-schema lakehouses. Precedence: model config(workspace_name=...) > this value.
hint: 'Optional. Default workspace name for cross-workspace 4-part naming. When set and the target lakehouse has schemas enabled, all relations without an explicit model-level workspace_name will be prefixed with this workspace. Ignored for non-schema lakehouses. Precedence: model config(workspace_name=...) > this value.'
quote_identifiers:
hint: When true, backtick-quotes table identifiers so Fabric Spark preserves their casing instead of folding to lowercase. Requires spark.sql.caseSensitive=true under spark_config.conf to take effect. Session-wide (also affects column resolution). Defaults to false.
type: 'bool'
Expand Down
17 changes: 17 additions & 0 deletions tests/unit/test_profile_template.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
from pathlib import Path

import yaml

REPO_ROOT = Path(__file__).resolve().parents[2]
PROFILE_TEMPLATE = REPO_ROOT / "src" / "dbt" / "include" / "fabricspark" / "profile_template.yml"


def test_profile_template_is_valid_yaml() -> None:
template = yaml.safe_load(PROFILE_TEMPLATE.read_text(encoding="utf-8"))

workspace_prompt = template["prompts"]["_choose_authentication_method"]["livy"][
"workspace_name"
]
assert workspace_prompt["hint"].endswith(
"Precedence: model config(workspace_name=...) > this value."
)