Skip to content
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

Minimum grain clean up #1539

Merged
merged 1 commit into from
Dec 9, 2024
Merged

Minimum grain clean up #1539

merged 1 commit into from
Dec 9, 2024

Conversation

courtneyholcomb
Copy link
Contributor

Clean up.

  1. Rename default grain -> min grain. This was causing me some confusion because we recently introduced the concept of default grain for metrics, which is defined in the YAML spec, but this code was not referring to that.
  2. Also moves some related logic to helper functions to improve readability.

@cla-bot cla-bot bot added the cla:yes label Nov 20, 2024
@@ -1613,10 +1611,6 @@ def _build_aggregated_measure_from_measure_source_node(

# If querying an offset metric, join to time spine before aggregation.
if before_aggregation_time_spine_join_description is not None:
assert queried_agg_time_dimension_specs, (
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed this because the JoinToTimeSpineNode will raise the same error in __post_init__ on instantiation, so we don't need both.

@dbt-labs dbt-labs deleted a comment from github-actions bot Nov 20, 2024
@courtneyholcomb courtneyholcomb marked this pull request as ready for review November 21, 2024 00:03
Base automatically changed from court/simp0 to main December 9, 2024 19:13
Clean up. This was causing me some confusion because we recently
introduced the concept of default grain for metrics, which is defined in
 the YAML spec, but this code was not referring to that.
@courtneyholcomb courtneyholcomb enabled auto-merge (squash) December 9, 2024 19:16
@courtneyholcomb courtneyholcomb merged commit c14f1ea into main Dec 9, 2024
11 checks passed
@courtneyholcomb courtneyholcomb deleted the court/simp1 branch December 9, 2024 19:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants