-
Notifications
You must be signed in to change notification settings - Fork 163
make package compatible with Azure Synapse and Microsoft Fabric #529
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this 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) -%} |
Copilot
AI
Sep 23, 2025
There was a problem hiding this comment.
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.
|
|
||
|
|
||
| {% macro sqlserver__get_tests_dml_sql(tests) -%} | ||
| {% macro fabric__get_tests_dml_sql(tests) -%} |
Copilot
AI
Sep 23, 2025
There was a problem hiding this comment.
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.
| {% endmacro -%} | ||
|
|
||
| {% macro sqlserver__get_test_executions_dml_sql(tests) -%} | ||
| {% macro fabric__get_test_executions_dml_sql(tests) -%} |
Copilot
AI
Sep 23, 2025
There was a problem hiding this comment.
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.
|
|
||
|
|
||
| {% macro sqlserver__get_sources_dml_sql(sources) -%} | ||
| {% macro fabric__get_sources_dml_sql(sources) -%} |
Copilot
AI
Sep 23, 2025
There was a problem hiding this comment.
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.
|
|
||
|
|
||
| {% macro sqlserver__get_snapshots_dml_sql(snapshots) -%} | ||
| {% macro fabric__get_snapshots_dml_sql(snapshots) -%} |
Copilot
AI
Sep 23, 2025
There was a problem hiding this comment.
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.
| {% endmacro -%} | ||
|
|
||
| {% macro sqlserver__get_seed_executions_dml_sql(seeds) -%} | ||
| {% macro fabric__get_seed_executions_dml_sql(seeds) -%} |
Copilot
AI
Sep 23, 2025
There was a problem hiding this comment.
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.
|
|
||
|
|
||
| {% macro sqlserver__get_models_dml_sql(models) -%} | ||
| {% macro fabric__get_models_dml_sql(models) -%} |
Copilot
AI
Sep 23, 2025
There was a problem hiding this comment.
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.
|
|
||
|
|
||
| {% macro sqlserver__get_model_executions_dml_sql(models) -%} | ||
| {% macro fabric__get_model_executions_dml_sql(models) -%} |
Copilot
AI
Sep 23, 2025
There was a problem hiding this comment.
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.
| {% macro sqlserver__get_invocations_dml_sql() -%} | ||
| {% macro fabric__get_invocations_dml_sql() -%} |
Copilot
AI
Sep 23, 2025
There was a problem hiding this comment.
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.
| {%- endmacro %} | ||
|
|
||
| {% macro sqlserver__get_exposures_dml_sql(exposures) -%} | ||
| {% macro fabric__get_exposures_dml_sql(exposures) -%} |
Copilot
AI
Sep 23, 2025
There was a problem hiding this comment.
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.
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__withfabric__.Update type - breaking / non-breaking
What does this solve?
This adds compatibility for Azure Synapse and Microsoft Fabric.
Outstanding questions
What databases have you tested with?