Skip to content

Conversation

@sdebruyn
Copy link

Overview

This adds compatibility for Azure Synapse and Microsoft Fabric.

The new version of the sqlserver adapter inherits from the fabric adapter. So in the macros, we can just replace sqlserver__ with fabric__.

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?

This adds compatibility for Azure Synapse and Microsoft Fabric.

Outstanding questions

What databases have you tested with?

  • Snowflake
  • Google BigQuery
  • Databricks
  • Spark
  • N/A

Copilot AI review requested due to automatic review settings September 23, 2025 15:22
@sdebruyn sdebruyn had a problem deploying to Approve Integration Tests September 23, 2025 15:22 — with GitHub Actions Failure
@sdebruyn sdebruyn had a problem deploying to Approve Integration Tests September 23, 2025 15:22 — with GitHub Actions Failure
@sdebruyn sdebruyn had a problem deploying to Approve Integration Tests September 23, 2025 15:22 — with GitHub Actions Failure
@sdebruyn sdebruyn had a problem deploying to Approve Integration Tests September 23, 2025 15:22 — with GitHub Actions Failure
@sdebruyn sdebruyn had a problem deploying to Approve Integration Tests September 23, 2025 15:22 — with GitHub Actions Failure
@sdebruyn sdebruyn had a problem deploying to Approve Integration Tests September 23, 2025 15:22 — with GitHub Actions Failure
@sdebruyn sdebruyn had a problem deploying to Approve Integration Tests September 23, 2025 15:22 — with GitHub Actions Failure
@sdebruyn sdebruyn had a problem deploying to Approve Integration Tests September 23, 2025 15:22 — with GitHub Actions Failure
@sdebruyn sdebruyn had a problem deploying to Approve Integration Tests September 23, 2025 15:22 — with GitHub Actions Failure
@sdebruyn sdebruyn had a problem deploying to Approve Integration Tests September 23, 2025 15:22 — with GitHub Actions Failure
Copy link

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 extends dbt package compatibility to support Azure Synapse and Microsoft Fabric, which inherit from the SQL Server adapter. The changes replace SQL Server-specific conditional logic to include these new target types.

  • Updates conditional logic throughout the codebase to include "synapse" and "fabric" alongside "sqlserver"
  • Replaces SQL Server-specific macro implementations with Fabric equivalents
  • Adds type mappings for the new database targets in configuration files

Reviewed Changes

Copilot reviewed 38 out of 38 changed files in this pull request and generated 12 comments.

Show a summary per file
File Description
models/staging/*.sql Updated target type conditionals to include synapse and fabric
models/sources/*.sql Updated target type conditionals to include synapse and fabric
models/fct_*.sql Updated target type conditionals to include synapse and fabric
models/dim_*.sql Updated target type conditionals to include synapse and fabric
macros/upload_results/*.sql Renamed sqlserver__ macros to fabric__ and updated conditionals
macros/upload_individual_datasets/*.sql Renamed sqlserver__ macros to fabric__
macros/integration_tests/safe_cast.sql Added type mappings for synapse and fabric
integration_test_project/seeds/seeds.yml Updated column type conditional
dbt_project.yml Updated persist_docs configuration conditionals

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

{%- endmacro %}

{% macro sqlserver__insert_into_metadata_table(relation, fields, content) -%}
{% macro fabric__insert_into_metadata_table(relation, fields, content) -%}
Copy link

Copilot AI Sep 23, 2025

Choose a reason for hiding this comment

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

Replacing the sqlserver__ macro with fabric__ means SQL Server users will lose access to this specific implementation. Consider keeping both macros or creating a shared implementation that all three target types can use.

Copilot uses AI. Check for mistakes.


{% macro sqlserver__get_tests_dml_sql(tests) -%}
{% macro fabric__get_tests_dml_sql(tests) -%}
Copy link

Copilot AI Sep 23, 2025

Choose a reason for hiding this comment

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

Replacing the sqlserver__ macro with fabric__ means SQL Server users will lose access to this specific implementation. Consider keeping both macros or creating a shared implementation that all three target types can use.

Copilot uses AI. Check for mistakes.
{% endmacro -%}

{% macro sqlserver__get_test_executions_dml_sql(tests) -%}
{% macro fabric__get_test_executions_dml_sql(tests) -%}
Copy link

Copilot AI Sep 23, 2025

Choose a reason for hiding this comment

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

Replacing the sqlserver__ macro with fabric__ means SQL Server users will lose access to this specific implementation. Consider keeping both macros or creating a shared implementation that all three target types can use.

Copilot uses AI. Check for mistakes.


{% macro sqlserver__get_sources_dml_sql(sources) -%}
{% macro fabric__get_sources_dml_sql(sources) -%}
Copy link

Copilot AI Sep 23, 2025

Choose a reason for hiding this comment

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

Replacing the sqlserver__ macro with fabric__ means SQL Server users will lose access to this specific implementation. Consider keeping both macros or creating a shared implementation that all three target types can use.

Copilot uses AI. Check for mistakes.


{% macro sqlserver__get_snapshots_dml_sql(snapshots) -%}
{% macro fabric__get_snapshots_dml_sql(snapshots) -%}
Copy link

Copilot AI Sep 23, 2025

Choose a reason for hiding this comment

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

Replacing the sqlserver__ macro with fabric__ means SQL Server users will lose access to this specific implementation. Consider keeping both macros or creating a shared implementation that all three target types can use.

Copilot uses AI. Check for mistakes.
{% endmacro -%}

{% macro sqlserver__get_seed_executions_dml_sql(seeds) -%}
{% macro fabric__get_seed_executions_dml_sql(seeds) -%}
Copy link

Copilot AI Sep 23, 2025

Choose a reason for hiding this comment

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

Replacing the sqlserver__ macro with fabric__ means SQL Server users will lose access to this specific implementation. Consider keeping both macros or creating a shared implementation that all three target types can use.

Copilot uses AI. Check for mistakes.


{% macro sqlserver__get_models_dml_sql(models) -%}
{% macro fabric__get_models_dml_sql(models) -%}
Copy link

Copilot AI Sep 23, 2025

Choose a reason for hiding this comment

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

Replacing the sqlserver__ macro with fabric__ means SQL Server users will lose access to this specific implementation. Consider keeping both macros or creating a shared implementation that all three target types can use.

Copilot uses AI. Check for mistakes.


{% macro sqlserver__get_model_executions_dml_sql(models) -%}
{% macro fabric__get_model_executions_dml_sql(models) -%}
Copy link

Copilot AI Sep 23, 2025

Choose a reason for hiding this comment

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

Replacing the sqlserver__ macro with fabric__ means SQL Server users will lose access to this specific implementation. Consider keeping both macros or creating a shared implementation that all three target types can use.

Copilot uses AI. Check for mistakes.
{% macro sqlserver__get_invocations_dml_sql() -%}
{% macro fabric__get_invocations_dml_sql() -%}
Copy link

Copilot AI Sep 23, 2025

Choose a reason for hiding this comment

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

Replacing the sqlserver__ macro with fabric__ means SQL Server users will lose access to this specific implementation. Consider keeping both macros or creating a shared implementation that all three target types can use.

Copilot uses AI. Check for mistakes.
{%- endmacro %}

{% macro sqlserver__get_exposures_dml_sql(exposures) -%}
{% macro fabric__get_exposures_dml_sql(exposures) -%}
Copy link

Copilot AI Sep 23, 2025

Choose a reason for hiding this comment

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

Replacing the sqlserver__ macro with fabric__ means SQL Server users will lose access to this specific implementation. Consider keeping both macros or creating a shared implementation that all three target types can use.

Copilot uses AI. Check for mistakes.
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