Fix case mismatch in dbt-date round_timestamp test fixture#253
Merged
Conversation
The get_test_dates() override used a string replacement that looked for 'DATETIME2(6)' (uppercase), but fabric__type_timestamp() returns 'datetime2(6)' (lowercase via the Jinja macro override). The replacement never matched, leaving rounded_timestamp as '2021-06-07' while round_timestamp() computed '2021-06-08', causing 2 rows to fail. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
This PR fixes a dbt-date integration test fixture override so the expected rounded_timestamp value is correctly patched for Fabric’s lowercase datetime2(6) rendering.
Changes:
- Updates the Jinja
replacefilter to matchdatetime2(6)casing. - Keeps the override focused on the known UTC
round_timestampexpectation mismatch.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Owner
Author
|
/test-dw -k TestDbtDate |
|
❌ DW integration tests failed Filter: |
Owner
Author
|
/test-dw TestDbtDate |
|
✅ DW integration tests passed Filter: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
expression_is_true_test_dates_rounded_timestamp_dbt_date_round_timestamp_time_stamp_test failure (2 rows not matching) in the DW integration tests for the dbt-date package.get_test_dates()override used a Jinjareplacefilter matchingDATETIME2(6)(uppercase), butfabric__type_timestamp()resolves todatetime2(6)(lowercase via the Jinja macro indbt_expectations/utils/datatypes.sql). The replacement never fired, so the expectedrounded_timestampcolumn stayed at'2021-06-07'whileround_timestamp()correctly computed'2021-06-08'.rounded_timestamp_utcalready had the correct expected value ('2021-06-08') from the upstream fixture.Test plan
/test-dw TestDbtDateto confirm the round_timestamp assertion passes🤖 Generated with Claude Code