Replies: 5 comments
-
|
Would it be possible to do that by creating some kind of "custom expectation factory", that receives the custom query and outputs the custom expectation as a class/function? |
Beta Was this translation helpful? Give feedback.
-
|
I changed the name of this issue to avoid confusion. We've had some people think this issue was about putting expectations on a custom sql dataset. That's not what this issue is about. That can be done currently using a custom sql query as a runtime parameter in validation. This issue is about auto-generating GE expectations from tests written in sql. |
Beta Was this translation helpful? Give feedback.
-
|
Hi, I've found this issue during a search for the same issue. Here we want to translate some business rules to expectations, it would be great to build an expectation based on a SQL (i.e. columns created based on some SQL logic) query without the need to create a view only to do it. Does anyone have any news about it? |
Beta Was this translation helpful? Give feedback.
-
|
Auto-generating Great Expectations expectations from SQL tests is a fantastic direction — it bridges the gap between "SQL-literate data engineers" and the GX ecosystem. The value proposition: What the mapping looks like:
The hard cases:
Implementation approach: Is this targeting specific SQL dialects (dbt tests, Airflow checks) or general SQL? |
Beta Was this translation helpful? Give feedback.
-
|
Recent versions of GX support this use case with the UnexpectedRowsExpectation |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Currently you must use Python and SQLAlchemy to create a new expectation that can be used against a database.
There’s a whole community of data analysts and scientists who would love to author new/custom expectations that can run against their databases for whom SQL is the primary language.
There should be a way to translate a SQL query into a new expectation without writing any Python.
Beta Was this translation helpful? Give feedback.
All reactions