ReleaseSnowflake (Arctic)Snowflake (Arctic)published Jan 13, 2026seen 5d

Snowflake-Labs/dbt_constraints 1.0.8

Snowflake-Labs/dbt_constraints

Open original ↗

Captured source

source ↗
published Jan 13, 2026seen 5dcaptured 9hhttp 200method plain

1.0.8

Repository: Snowflake-Labs/dbt_constraints

Tag: 1.0.8

Published: 2026-01-13T21:04:43Z

Prerelease: no

Release notes:

Summary

This release adds dbt Fusion compatibility to dbt_constraints, along with a robust Docker-based integration testing framework. The package now works with both traditional dbt-core and the next-generation dbt Fusion engine.

Key Changes

🔧 dbt Fusion Compatibility

1. New `get_results_group_by()` Utility Macro

  • Replaces Agate's native group_by() function which doesn't work in dbt Fusion
  • Provides a pure Jinja implementation that works identically in both dbt-core and Fusion
  • Updated all adapter macros (Snowflake, Postgres, Oracle, BigQuery, Redshift, Vertica) to use this new utility

2. Fusion Argument Format Handling

  • dbt Fusion nests test arguments under an arguments key in test_metadata.kwargs
  • Added logic to detect and merge this nested format with top-level kwargs
  • Maintains full backward compatibility with dbt-core's flat kwargs structure

3. Safe Meta Attribute Access

  • Changed test_model.config.meta.get() to test_model.config.get("meta", {}).get()
  • Prevents errors when meta is undefined in Fusion's object model

4. Graceful FK Constraint Handling

  • Foreign key constraints with missing parameters now log a warning and skip instead of raising a compiler error
  • This accommodates a known Fusion limitation where test arguments aren't fully preserved in test_metadata.kwargs

🧪 Integration Testing Framework

1. Docker-Based Test Infrastructure

  • Added Docker Compose configurations for all supported databases (Snowflake, Postgres, Oracle, SQL Server)
  • New fusion-runner.yml for testing with dbt Fusion
  • Automated test runner scripts with proper environment handling

2. Reorganized Test Projects

  • Split integration tests into dbt-core/ and dbt-fusion/ subdirectories
  • Each has its own dbt_project.yml, profiles.yml, and test configurations
  • Allows testing both engines with their specific requirements

3. pytest Integration

  • New conftest.py with fixtures for database setup and dbt command execution
  • Support for running tests across multiple dbt versions (1.5.0 - 1.10.0)
  • Configurable test matrix via test-versions.json

Files Changed

| Category | Files | |----------|-------| | Core Macros | create_constraints.sql, all *__create_constraints.sql adapters | | New Test Project | integration_tests/dbt-fusion/* (41 files) | | Test Infrastructure | automated_tests/docker/compose/*.yml, conftest.py, test-versions.json | | Documentation | README.md files updated |

Testing

  • ✅ Snowflake dbt-core 1.9.0 - PASSED
  • ✅ dbt Fusion latest - PASSED

Known Limitations

dbt Fusion currently has a limitation where foreign key test arguments (pk_column_name, fk_column_name, etc.) are not fully exposed in test_metadata.kwargs. This means:

  • Primary key and unique key constraints work correctly
  • Foreign key constraints will be skipped with an informational warning in Fusion

This is a Fusion engine limitation that we've documented and worked around gracefully.

Breaking Changes

None. This release is fully backward compatible with existing dbt-core installations.

  • feat: dbt Fusion Compatibility & Integration Testing Framework by @sfc-gh-dflippo in https://github.com/Snowflake-Labs/dbt_constraints/pull/113
  • Add compatibility for Fusion by @b-per in https://github.com/Snowflake-Labs/dbt_constraints/pull/106

New Contributors

  • @b-per made their first contribution in https://github.com/Snowflake-Labs/dbt_constraints/pull/106

Full Changelog: https://github.com/Snowflake-Labs/dbt_constraints/compare/1.0.7...1.0.8

Notability

notability 3.0/10

Minor update to niche dbt package