Support DuckDB percentile medians#185
Open
YahiaQuacks wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Please provide your name and company
Yahia Mostafa, MotherDuck.
Link the issue/feature request which this PR is meant to address
No public issue yet. This addresses a DuckDB compatibility issue in the Jira package’s median metric models.
Detail what changes this PR introduces and how this addresses the issue/feature request linked above.
This PR updates the Jira median metric models so DuckDB uses the grouped aggregate percentile path already used by Postgres. Depends on fivetran/dbt_fivetran_utils#155, which adds the DuckDB dispatch for
fivetran_utils.percentile.DuckDB supports
percentile_cont(...) within group (order by ...)as an aggregate, but does not support the Redshift-stylepercentile_cont(...) within group (...) over (...)window form emitted through the defaultfivetran_utils.percentiledispatch.This PR:
fivetran_utilsdependency floor to a version that includesduckdb__percentile.How did you validate the changes introduced within this PR?
Validated against DuckDB:
percentile_cont(0.5) within group (order by x).Catalog Error: Aggregate Function with name percentile_cont does not exist!, matching the reported failure.Also ran
git diff --check.Which warehouse did you use to develop these changes?
DuckDB/MotherDuck.
Did you update the CHANGELOG?
Did you update the dbt_project.yml files with the version upgrade (please leverage standard semantic versioning)? (In both your main project and integration_tests)
Typically there are additional maintenance changes required before this will be ready for an upcoming release. Are you comfortable with the Fivetran team making a few commits directly to your branch?
If you had to summarize this PR in an emoji, which would it be?
🦆