-
Notifications
You must be signed in to change notification settings - Fork 944
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Redshift unit test limitation #5508
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@matthewshaver Just have some suggestion to smooth this message out.
); | ||
|
||
``` | ||
This results in the error: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This results in the error: | |
The previous code results in the error: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could going from "The following query" to the code example, to "the previous code" be a little redundant?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@matthewshaver how about "This query results in the error:"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works for me!
Co-authored-by: Leona B. Campbell <[email protected]>
Co-authored-by: Leona B. Campbell <[email protected]>
|
||
## Unit test limitations | ||
|
||
Redshift doesn't support Unit tests when the SQL in the common table expression (CTE) contains functions such as `LISTAGG`, `MEDIAN`, `PERCENTILE_CONT`, etc. These functions must be executed against a user-created table. dbt combines given rows to be part of the CTE, which Redshift does not support. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@matthewshaver What I like about how the content is framed below is that it's clearer than this paragraph and it's framed in the positive. I think we should rewrite this paragraph so we:
- Communicate that unit test are limited by actually saying what they need to do to get unblocked. like "Avoid using SQL in CTE functions such as.." and "Unit tests can be used when you.."
- Explain how to overcome this limitation. Instead of the passive language of "These functions must be executed..." Use more active language like "Execute these functions against..."
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This works
What are you changing in this pull request and why?
Closes: #5430
Checklist
Adding or removing pages (delete if not applicable):
website/sidebars.js
website/vercel.json
npm run build
to update the links that point to deleted pages