Skip to content

Conversation

@prdpsvs
Copy link
Contributor

@prdpsvs prdpsvs commented May 17, 2025

This pull request introduces significant updates to the Azure Synapse adapter for dbt, including a new snapshot materialization, dependency adjustments, and test updates. The most important changes are grouped below by theme.

New Snapshot Materialization for Synapse:

  • Added a new snapshot materialization specific to the Synapse adapter in dbt/include/synapse/macros/materializations/snapshots/snapshot.sql. This materialization handles snapshot strategies, temporary views, column management, and grants application, tailored for Synapse's unique requirements.

Dependency Updates:

  • Updated the dbt-adapters dependency in dev_requirements.txt to include the dbt-adapters subdirectory for proper installation.
  • Adjusted the dbt-fabric version requirement in setup.py to >=1.8.0, <1.9.0 for compatibility.

Test Updates:

  • Modified the test_concurrency assertion in tests/functional/adapter/test_concurrency.py to include NO-OP=0 in the output validation.
  • Updated roles in TestDocsGenerateSynapse and TestDocsGenReferencesSynapse in tests/functional/adapter/test_docs.py from dbt-synapse-ci to dbo. [1] [2]

@prdpsvs prdpsvs requested a review from Copilot May 17, 2025 06:20
@prdpsvs prdpsvs closed this May 17, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds a Synapse-specific snapshot materialization, bumps adapter dependency ranges, and updates tests to align with new output and default roles.

  • Introduces a new snapshot materialization macro tailored for Azure Synapse
  • Adjusts dbt-fabric and dbt-adapters version/specifier for compatibility
  • Updates functional tests for concurrency output and default role changes

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
dbt/include/synapse/macros/materializations/snapshots/snapshot.sql Implements a Synapse-specific snapshot materialization
setup.py Loosens dbt-fabric requirement to >=1.8.0,<1.9.0
dev_requirements.txt Adds #egg and subdirectory parameters for dbt-adapters install
tests/functional/adapter/test_concurrency.py Updates concurrency assertion to include NO-OP=0
tests/functional/adapter/test_docs.py Changes expected role from dbt-synapse-ci to dbo
Comments suppressed due to low confidence (2)

dbt/include/synapse/macros/materializations/snapshots/snapshot.sql:65

  • Add functional tests for this snapshot materialization covering both initial table creation and incremental snapshot scenarios to ensure correctness.
{% materialization snapshot, adapter='synapse' %}

dev_requirements.txt:4

  • [nitpick] For consistency, consider adding an explicit #egg=dbt-tests-adapter identifier to the dbt-tests-adapter line so pip can reliably detect both packages.
git+https://github.com/dbt-labs/dbt-adapters.git#egg=dbt-adapters&subdirectory=dbt-adapters

@prdpsvs prdpsvs reopened this May 17, 2025
@prdpsvs prdpsvs requested review from a team and colin-rogers-dbt May 17, 2025 06:31
@colin-rogers-dbt colin-rogers-dbt merged commit 3b48ab2 into master May 18, 2025
1 of 2 checks passed
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.

3 participants