-
Notifications
You must be signed in to change notification settings - Fork 14
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
Assorted Naming and Type Fixes #187
base: main
Are you sure you want to change the base?
Conversation
Thank you for your pull request! We could not find a changelog entry for this change. For details on how to document a change, see the contributing guide. |
* Use nouns for fields - `fill_nulls_with` -> `null_fill_value` * Update the type for the metric null fill value to allow for floats. * Rename MetricInput.as_reference -> MetricInput.metric_reference * `timespine` -> `time_spine` in variable names since it's 2 words.
e29b0e6
to
0d5d374
Compare
@plypaul this is currently marked as a draft. Are we trying to get this into into 0.4.0 of DSI? |
@QMalcolm - Picking this back up again. What would be the best way forward on this? |
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.
None of the original blockers on this PR have changed, but for whatever reason we didn't write them down, so now I'm writing them down.
filter: Optional[PydanticWhereFilterIntersection] = None | ||
alias: Optional[str] = None | ||
time_spine_join: bool = False | ||
null_fill_value: Optional[float] = None |
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.
When we tried this float caused problems when the actual value is supposed to be an int.
In a perfect world we could do int | float
but that doesn't appear to resolve correctly and we haven't figured out how to deal with it.
def time_spine_join(self) -> bool: | ||
"""If the measure should be joined to the time spine.""" | ||
pass | ||
|
||
@property | ||
@abstractmethod | ||
def fill_nulls_with(self) -> Optional[int]: | ||
def null_fill_value(self) -> Optional[float]: |
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.
These are hard breaking changes on the dbt-core parser so we can't push these into dbt-semantic-interfaces or take dependencies on these names in MetricFlow if we want to be able to backport things.
It's fine to add duplicate fields with the new names, and once we get support for both broadly available across the releases we are committed to supporting we can gradually remove the old ones, but given that 1) these names were chosen within the context of existing dbt metrics nomenclature and 2) they're now out in the world I'm not sure this adjustment is worth the effort.
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 just want to echo everything @tlento has already said. If we aren't trying to move forward with this renames/typings should we close this for the time being?
Description
fill_nulls_with
->null_fill_value
timespine
->time_spine
in field names since it's 2 words.Checklist
changie new
to create a changelog entry