Skip to content

Fix: Handle T-SQL/Fabric table name quoting in ManifestNode identifier generation - #179

Merged
adrienneyager merged 2 commits into
mainfrom
fix/fabric_identifer_escaping
May 30, 2026
Merged

adrienneyager merged 2 commits into
mainfrom
fix/fabric_identifer_escaping

Conversation

@adrienneyager

Copy link
Copy Markdown
Owner

Description and Motivation

In dbt-fabric 1.9.9, the adapter now provides relation name values with full bracket escaping ([database].[schema].[table]). This is not uncommon, but has a non-traditional syntax for folks outside of the T-SQL world. Currently, dbt-loom uses the relation name to generate an internal identifier for downstream relation construction. Unfortunately, dbt-loom is not fluent in T-SQL yet, and it will return [table] as the identifier and not identifier. When this gets wrapped by the adapter again in a downstream project, it'll get doubled wrapped ([[table]). Kudos to @paul-schale for the explanation!

This PR does two things:

  1. It adds unit tests to verify this functionality within the identifier property method. This lets us keep an eye on what quote characters are removed.
  2. Updated the identifier property method in ManifestNode to handle the [] quote chars! To do this, I've swapped over to using regex instead of using a series of replace statements. It's quite a bit more elegant IMHO.

Between the unit test and some smoke tests, this seems to work perfectly.

Resolves: #178

MysticLavender added 2 commits May 29, 2026 20:55
@adrienneyager adrienneyager self-assigned this May 30, 2026
@adrienneyager adrienneyager added the bug Something isn't working label May 30, 2026
@adrienneyager
adrienneyager marked this pull request as ready for review May 30, 2026 01:17
@adrienneyager
adrienneyager merged commit 6973556 into main May 30, 2026
3 checks passed
@adrienneyager
adrienneyager deleted the fix/fabric_identifer_escaping branch May 30, 2026 01:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support dbt-fabric>=1.9.9 -- quotes-to-brackets change causing error with cross-project refs

1 participant