-
Notifications
You must be signed in to change notification settings - Fork 514
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
WIP: Add cross db ceiling macro #332
Conversation
@clrcrl can you share what's failing? I can't see the pipeline details. |
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.
😅
sorry about the delay here!
ceil({{ field }}) | ||
{%- endmacro %} | ||
|
||
{% macro alternative_ceil(field) %} |
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.
Which adapters need to use ceiling
over ceil
? We'll want to adjust this to something like:
{% macro alternative_ceil(field) %} | |
{% macro redshift__ceil(field) %} |
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.
it's spark specifically (so dbx, but I thought it took the default then the alternative then database specific ones? since there was only on alternative (redshift, bq, and snowflake are all ceil), I thought one catchall might make more sense? If you don't think so, I can move this PR to spark_utils.
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.
I guess in both cases we'd need the default in dbt-utils, and the override in spark utils. Since none of our core adapters use ceiling
, I think we'd want the spark-specific version over in spark-utils
Co-authored-by: Claire Carroll <[email protected]>
445dbfd
to
4843069
Compare
Co-authored-by: Claire Carroll <[email protected]>
This is a:
master
dev/
branchdev/
branchDescription & motivation
This adds a default call and an alternate call for
ceil
orceiling
so that it can be used across more systems. Notably, this makes things Spark compatible. dbt-labs/spark-utils#5Checklist