Skip to content

docs: cover the five new with_context tests and drop accepted_range - #2338

Open
joostboon wants to merge 2 commits into
docsfrom
with-context-tests-expansion-docs
Open

docs: cover the five new with_context tests and drop accepted_range#2338
joostboon wants to merge 2 commits into
docsfrom
with-context-tests-expansion-docs

Conversation

@joostboon

Copy link
Copy Markdown

Documents the changes in dbt-data-reliability#1046.

Single page touched: data-tests/with-context-tests. It is already in docs.json, so there is no navigation change.

Added

Five new tests, slotted next to the tests they relate to rather than appended:

  • expression_is_true_with_context
  • not_empty_string_with_context
  • expect_column_pair_values_A_to_be_greater_than_B_with_context
  • expect_compound_columns_to_be_unique_with_context
  • expect_column_values_to_match_regex_list_with_context

Removed

accepted_range_with_context, which no longer ships. The range use case is now covered by an expression_is_true_with_context example, so the capability is still discoverable without documenting a test that is gone.

Corrected

Two statements on the page that are no longer true:

  • The regex test carried an <Info> saying it requires dbt_expectations to be installed. That dependency is gone. The intro now states positively that these tests need no extra packages, which is the thing users will actually search for.
  • In its place, both regex tests now carry a <Warning> that they are unsupported on SQL Server and Microsoft Fabric, since T-SQL has no regex functions and the test raises a compilation error there. This is a real constraint that was previously undocumented.

Also

expression_is_true_with_context is table-level, so unlike every other test on the page it has no tested column to seed the sample with. Every wanted column has to be listed under context_columns. That is the one genuinely surprising thing about it, so it is called out in a <Note> rather than left to be discovered.

Checks

mintlify broken-links passes (success no broken links found). Components and code fences verified balanced.

🤖 Generated with Claude Code

Adds expression_is_true_with_context, not_empty_string_with_context,
expect_column_pair_values_A_to_be_greater_than_B_with_context,
expect_compound_columns_to_be_unique_with_context and
expect_column_values_to_match_regex_list_with_context.

Removes accepted_range_with_context, which no longer ships.

Corrects two things that are no longer true. The regex test carried a
"Requires dbt_expectations to be installed" note; the tests now use a native
implementation and need no extra packages, so the intro says that explicitly.
In its place the regex tests carry a warning that T-SQL has no regex
functions, so they are unsupported on SQL Server and Fabric.

Also notes that expression_is_true_with_context is table-level and therefore
needs every wanted column listed under context_columns, which is the one
non-obvious thing about it.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Aug 30, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Team

Run ID: 98b7bff3-4f78-4c90-85a6-a23a3f3802d8

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Comment @coderabbitai help to get the list of available commands.

The page had removed it outright, which no longer matches the package: it now
ships as a deprecated test that logs a warning and is scheduled for removal in
the next release. Published docs and the stored test description disagreed.

Adds it back at the end of the page, marked deprecated, with the migration to
dbt_utils.accepted_range and a pointer to the sampling controls for the one
thing it could do that the replacement cannot: narrowing a stored sample.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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