Skip to content

Add FabricSpark dbt-date integration tests and move BaseDbtPackageTests to shared module#228

Merged
sdebruyn merged 2 commits into
mainfrom
feature/fabricspark-dbt-date-tests
May 17, 2026
Merged

Add FabricSpark dbt-date integration tests and move BaseDbtPackageTests to shared module#228
sdebruyn merged 2 commits into
mainfrom
feature/fabricspark-dbt-date-tests

Conversation

@sdebruyn
Copy link
Copy Markdown
Owner

@sdebruyn sdebruyn commented May 16, 2026

Summary

  • Adds FabricSpark integration test class TestDbtDate in tests/fabricspark/packages/test_dbt_date.py
  • Moves BaseDbtPackageTests from tests/fabric/packages/ to tests/packages/ so both Fabric and FabricSpark suites import from a shared, adapter-neutral location
  • Updates all 7 existing Fabric package test imports and CLAUDE.md to use the new path
  • Uses centralized dbt_date_repo and dbt_date_revision fixtures from BaseDbtPackageTests
  • Relies on dbt-date's existing spark__ macros (found via FabricSpark's dependencies=["spark"] dispatch chain)
  • Uses America/Los_Angeles timezone to match dbt-date's Spark integration test fixtures
  • Excludes expression_is_true tests: upstream fixture renders cast('to_date(...)' as date) with nested single quotes causing Spark PARSE_SYNTAX_ERROR

Test plan

  • Run uv run pytest --de -k "TestDbtDate" against a Fabric Lakehouse — 1 passed (6 models, 0 errors)
  • Run uv run pytest --dw -k "packages" to verify Fabric package tests still work with the new import path — 7 passed (TestDbtDate Fabric failure is pre-existing, unrelated to import change)
  • No macro overrides needed — dbt-date's spark__ macros work via FabricSpark's dependencies=["spark"] dispatch chain

Closes #175

🤖 Generated with Claude Code

Copilot AI review requested due to automatic review settings May 16, 2026 23:26
@chatgpt-codex-connector
Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

Copy link
Copy Markdown

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

Adds a new FabricSpark integration test that exercises the upstream dbt-date package’s integration_tests project against the fabricspark adapter, validating that Spark-dispatched macros work correctly in FabricSpark.

Changes:

  • Introduces TestDbtDate integration test suite for FabricSpark, pulling dbt-date (and its integration_tests subdirectory) from GitHub at 0.17.2.
  • Configures dbt_date:time_zone to America/Los_Angeles and adds dispatch for the dbt_date_integration_tests namespace.
  • Runs the full package workflow (deps, seed, run, test) as part of the integration test.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread tests/fabricspark/packages/test_dbt_date.py
@sdebruyn sdebruyn force-pushed the feature/fabricspark-dbt-date-tests branch 2 times, most recently from c6c50ee to 67722f9 Compare May 17, 2026 13:32
@sdebruyn sdebruyn changed the base branch from main to feature/spark-views May 17, 2026 13:32
@sdebruyn sdebruyn force-pushed the feature/fabricspark-dbt-date-tests branch from 2306c2b to 4b8dea6 Compare May 17, 2026 13:58
@sdebruyn sdebruyn changed the base branch from feature/spark-views to main May 17, 2026 13:58
@sdebruyn sdebruyn changed the title Add FabricSpark integration tests for dbt-date package Add FabricSpark dbt-date integration tests and move BaseDbtPackageTests to shared module May 17, 2026
@sdebruyn sdebruyn force-pushed the feature/fabricspark-dbt-date-tests branch from 4b8dea6 to 7ff6cdd Compare May 17, 2026 14:08
sdebruyn and others added 2 commits May 17, 2026 16:10
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@sdebruyn sdebruyn force-pushed the feature/fabricspark-dbt-date-tests branch from 7ff6cdd to 0b4ab2e Compare May 17, 2026 14:10
@sdebruyn sdebruyn requested a review from Copilot May 17, 2026 14:10
Copy link
Copy Markdown

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

Copilot reviewed 9 out of 12 changed files in this pull request and generated no new comments.

@sdebruyn sdebruyn merged commit fa561a3 into main May 17, 2026
8 checks passed
@sdebruyn sdebruyn deleted the feature/fabricspark-dbt-date-tests branch May 17, 2026 14:12
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.

Add FabricSpark integration tests for dbt-date package

2 participants