-
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
[Feature] Metric filters should be allowed to be non-string types #4294
Comments
Thanks @joellabes! I think this could be as simple as changing this line: dbt-core/core/dbt/contracts/graph/unparsed.py Lines 455 to 456 in 719b202
To: value: Union[str, int, float, bool] # others?? Thanks for noting as well that we'll need to update the v4 manifest. It's a tiny change, but a potentially important one for downstream metadata consumers. |
Gave that a whirl, but got Changing to just
works, but is obviously suboptimal. Regardless, there's going to be a bunch of testing implications as well so I don't think it's worth me pushing up that one liner - I'll leave it for the pros! |
This issue has been marked as Stale because it has been open for 180 days with no activity. If you would like the issue to remain open, please remove the stale label or comment on the issue, or it will be closed in 7 days. |
Although we are closing this issue as stale, it's not gone forever. Issues can be reopened if there is renewed community interest; add a comment to notify the maintainers. |
This issue has been marked as Stale because it has been open for 180 days with no activity. If you would like the issue to remain open, please comment on the issue or else it will be closed in 7 days. |
Although we are closing this issue as stale, it's not gone forever. Issues can be reopened if there is renewed community interest. Just add a comment to notify the maintainers. |
Is there an existing feature request for this?
Describe the Feature
Via dbt-labs/docs.getdbt.com#915
In a metric, the filter
is rejected during compilation
at path ['filters'][0]['value']: 100 is not of type 'string'
Types like bools, floats, ints should be allowed as well
Describe alternatives you've considered
Leaving them purely as strings. In that case, we'd need to change the documentation so that filters look like this:
Who will this benefit?
People who want to filter metrics in a friendly way
Are you interested in contributing this feature?
No
Anything else?
This would constitute an artifact schema change, and require us to update manifest v4 at schemas.getdbt.com
The text was updated successfully, but these errors were encountered: