[Core] Compute-node only functions in Redshift like MEDIAN, etc. won't work with unit tests #5430
Labels
content
Improvements or additions to content
dbt Core
The changes proposed in this issue relate to dbt Core
dbt-core v1.8
unit testing
docs for 1.8 unit testing
Milestone
Link to the page(s) on docs.getdbt.com requiring updates
Wherever we are documenting platform-specific caveats.
Possibly this page:
https://docs.getdbt.com/docs/build/unit-tests
Possibly this section:
https://docs.getdbt.com/docs/build/unit-tests#before-you-begin
Tell us more about this update
As noted in dbt-labs/dbt-redshift#807, certain functions in Redshift (
MEDIAN
,LISTAGG
, etc.) don't currently work with dbt's built-in unit testing capabilities being introduced in v1.8.The reason is that functions like MEDIAN are compute-node only functions and return an error if the query doesn't reference a user-defined table or Amazon Redshift system table.
Since dbt unit testing relies on CTE (rather than tables), models that contain any of these functions will fail with an error like:
Reviewers/Stakeholders/SMEs
.
Related GitHub issues
dbt-labs/dbt-redshift#807
Additional information
See internal Slack thread here:
https://dbt-labs.slack.com/archives/C05LRDBSCNL/p1714653471861229
The text was updated successfully, but these errors were encountered: