New Package: dbt-expectations

Hello all! I’ve been working on a port of the tests from the Great Expectations package to dbt. Turns out most of the expectations, except those relying on more complex statistical functions, can be ported to SQL without issue.

This allows dbt users that have been eyeing the Great Expectations Python package to use some of these tests directly in their dbt pipelines without having to deal with the potential complexities of integrating a Python-based testing workflow.

This package is currently in alpha release - that means ready for testing, but bound to have some changes to its API and functionality.
I’d love it if the dbt community would check it out and provide feedback via the Github issues page, or contribute directly via PRs. In particular, there are a few regex-based string matching tests I haven’t had a chance to implement yet.
(The project contains a set of integration tests, similar to what the dbt-utils package is doing - happy to walk anyone through how to set that up.)


wowowow this is insanely cool. I’m really excited about where this is going!!


I was exactly looking for this! Fantastic

1 Like

Great Expectations maintainer here: we’re super excited about this as well. A dbt-native implementation of GE’s testing semantics will be a really good thing for both communities.

We’re looking forward to supporting and contributing to this effort.


We were just talking about testing and Great Expectations…

Very cool indeed!
Idea: for the more complex statistical calculations: it might be an idea to try and generate javascipt stored procedures for them. Both Snowflake and Bigquery support stored that language.

Is it possible to integrate with GE Docs for reporting or will the tests will still be reported in dbt natively?