-
Notifications
You must be signed in to change notification settings - Fork 4
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
dbt diff() macro #42
Comments
Thank you so much for your interest @dbeatty10! This is a really exciting proposal, as I'd love to see the library hooked into the existing data ecosystem. I can think of a few considerations. Hopefully this long-ish response comes off as excited and welcoming rather than off-putting or overwhelming. After you read it, let me know where/how I can help! Separating query generation from query executionRight now the In the code, the crossover from step 1 to step 2 is here: datools/datools/explanations.py Line 271 in 595d19c
In your proposal, you'd like to use part 1 without relying on part 2. Since part 1 isn't exposed as a public API just yet, one way to accomplish that would be to extract Query generation executes queries as wellThe
The first issue seems easier to solve --- we can turn the support query into a subquery, and even benefit from one less round-trip to the database. The second issue will require a little bit of thought. Can If neither queries-inside-macros nor pushing down the queries works, we can still explore an alternative where bucketing is its own macro distinct from diffing, but I'd love to avoid changing the Generating SQL beyond
|
I'm interested in prototyping the following proposal.
Goal
Enable the
DIFF
operator within a dbt project.Implementation proposal
diff()
macro as the main interfacePotential syntax
Examples of dbt macros
These two dbt packages contain macros that might be useful for inspiration:
For example:
The text was updated successfully, but these errors were encountered: