Skip to content

Fix Microsoft Fabric compatibility in core artifact models - #582

Open
pradeepsrikakolapu wants to merge 1 commit into
brooklyn-data:mainfrom
pradeepsrikakolapu:fix/fabric-compatibility
Open

pradeepsrikakolapu wants to merge 1 commit into
brooklyn-data:mainfrom
pradeepsrikakolapu:fix/fabric-compatibility

Conversation

@pradeepsrikakolapu

Copy link
Copy Markdown

Overview

Extend the package's existing SQL Server compatibility branches to Microsoft Fabric
Warehouse. This fixes package-level SQL and configuration that cannot be overridden
through adapter dispatch alone.

Update type - breaking / non-breaking

  • Minor bug fix
  • Documentation improvements
  • Quality of Life improvements
  • New features (non-breaking change)
  • New features (breaking change)
  • Other (non-breaking change)
  • Other (breaking change)
  • Release preparation

What does this solve?

Fabric uses target.type == "fabric", so SQL Server-only conditions currently
exclude it even where it needs the same SQL:

  • Quote reserved column names such as "database" and "schema" in upload column
    lists and source, staging, dimension, and fact models.
  • Use explicit bit predicates in dim_dbt__current_models full-refresh calculations.
  • Disable relation and column documentation persistence for Fabric, where those
    operations are not supported by the adapter.

The changes add fabric to existing SQL Server branches. Other adapter paths are
unchanged, no dataset columns or column ordering change, and Snowflake-only
analytics models remain disabled.

Outstanding questions

This is the package-side companion to Fabric-specific upload macros being prepared
in microsoft/dbt-fabric. Those adapter
changes are not yet published. This PR alone does not provide standalone, complete
Fabric support with an older adapter.

The consuming project needs dispatch configured as follows, in addition to the
package's normal upload hook:

dispatch:
  - macro_namespace: dbt_artifacts
    search_order: ["dbt", "dbt_artifacts"]

No automated Fabric CI target is introduced here. The live regression currently
lives in the companion adapter worktree; upstream SQLFluff lint and other
warehouse integration suites were not run locally.

What databases have you tested with?

  • Snowflake
  • Google BigQuery
  • Databricks
  • Spark
  • Microsoft Fabric Warehouse
  • N/A

Live validation used dbt Core 1.12.5, dbt-adapters 1.24.5, and the in-progress
dbt-fabric 1.12.0 adapter changes. The scenario passed against dbt_artifacts
2.11.1 with this exact patch applied:

  1. Initialize all 34 enabled core package models.
  2. Execute seed, model, snapshot, and model data-test commands with upload hooks.
  3. Rerun the core package models and verify all 11 metadata/execution datasets.
  4. Check affected-row counts, apostrophe-containing JSON metadata, and test results.

The patch also applies cleanly to current upstream main at 16662c0.

## Summary
Include Fabric in the existing SQL Server branches for reserved column names,
full-refresh predicates, and documentation persistence configuration.

## Prompting Intent
The engineer requested pushing the prepared dbt_artifacts compatibility patch
and opening an upstream pull request using pradeepsrikakolapu, without committing
or pushing the separate dbt-fabric worktree.

## Linked Sources
- Upstream baseline: brooklyn-data@16662c0
- Companion adapter: https://github.com/microsoft/dbt-fabric

## Rationale
Adapter dispatch cannot override the package's hard-coded model branches,
non-dispatched upload column lists, or project-level persist_docs configuration.
Reuse the existing SQL Server behavior for Fabric rather than duplicate models.
Keep other adapter branches and Snowflake-only model enablement unchanged.
This patch depends on companion Fabric upload macros in dbt-fabric.
Validated all 11 upload datasets and enabled core models against Fabric Warehouse
using dbt Core 1.12.5 and dbt-adapters 1.24.5.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 5c2be06a-4302-4528-88ae-d5d2cabb2b21

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant