-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
[CT-314] [Feature] Migrate cross-db functions from dbt-utils to definition in Core, implementation in adapters #4813
Comments
Really good callouts, I had forgotten about these. Let's aim to rewrite these as Python class or context methods instead. We already have an |
Halfway through building that spreadsheet, I discovered that some macros that we had to make cross-compatible are now globally implemented (e.g. SF and BQ both now support One question I still have from a product perspective as opposed to implementation: How many functions do we want to proactively implement, compared to just waiting for them to be necessary? Some examples:
As we add more adapters, it becomes more necessary to have more of them available to deliver a good experience. E.g. all of the core 4 support A thought experiment: if we'd already moved these out of utils, and I had needed
|
Hey Joel thanks for pointing that out (this mismatches)! That isn't a good experience if you have one option but not the other (i.e.
To answer this question, I would only target the minor releases and not the patch releases for the additional functionality. If that means we have to span it over |
Agreed! We'd only add new functions in minor releases, since this also represents a change to the adapter interface (even if not a breaking one). In the meantime, the existence of |
OK! Sounds good to me 👍 |
Early June updateWe have open PRs to migrate the vast majority of "cross-db" macros from
Immediate next stepsThere are two tricky areas that we're splitting out into separate units of work:
There's follow-on work in other plugins, to mirror the migration by moving these macros from shim packages → primary plugin. For us, that's
Down the lineWe've also opened "tech debt" tickets for shortcomings in the core adapter interface, uncovered during this work: |
Closing this issue as resolved, since we've got the follow-up issues noted above to scope our more targeted work moving forward |
Is there an existing feature request for this?
Describe the Feature
As discussed in dbt-labs/dbt-utils#487, it makes more sense for the cross-db macros (length, dateadd, etc...) to be defined as Core constructs and implemented by the various adapters.
Why?
Describe alternatives you've considered
Doing nothing
Who will this benefit?
Package developers and maintainers
Are you interested in contributing this feature?
Sure am!
Anything else?
I've build a list of the different macros and which ones will need to be custom implemented by different adapters here: https://docs.google.com/spreadsheets/d/1xF_YwJ4adsnjFkUbUm8-EnEL1r_C-9_OI_pP4m4FlJU/edit#gid=1062533692
Also interested in whether there's any better ways of implementing _is_ephemeral and _is_relation inside of Core as opposed to the current approach!
The text was updated successfully, but these errors were encountered: