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

Making Metric Timestamps Optional #6402

Merged
merged 8 commits into from
Jan 5, 2023
Merged

Conversation

callum-mcdata
Copy link
Contributor

@callum-mcdata callum-mcdata commented Dec 7, 2022

resolves #6398

Description

This makes the timestamp property optional. This is in order to support non time-grain behavior in dbt_metrics. PR here: dbt-labs/dbt_metrics#204

Concrete changes:

  • Makes timestamp optional
  • Raises a ValidationError if time_grains are defined but are missing timestamp
  • Raises a ValidationError if window is defined but is missing timestamp
  • Adds tests to ensure that all three above pieces of functionality are working as expected

Checklist

@cla-bot cla-bot bot added the cla:yes label Dec 7, 2022
@callum-mcdata callum-mcdata changed the title [DRAFT] Making Metric Timestamps Optional Making Metric Timestamps Optional Jan 4, 2023
@callum-mcdata callum-mcdata marked this pull request as ready for review January 4, 2023 20:31
@callum-mcdata callum-mcdata requested review from a team as code owners January 4, 2023 20:31
@gshank gshank merged commit d43c070 into main Jan 5, 2023
@gshank gshank deleted the metric-making-timestamp-optional branch January 5, 2023 20:49
@jtcohen6
Copy link
Contributor

@callum-mcdata I think this requires an update to docs (for v1.4+), since we currently say that timestamp is required in this table. Does that sound right to you?

@callum-mcdata
Copy link
Contributor Author

@jtcohen6 yep! I've got it on my to-do - we're going to mirror the readme in dbt_metrics over to the docs page so people don't need to reference two locations.

@callum-mcdata
Copy link
Contributor Author

@jtcohen6 if you're curious here is the PR for updating the docs

@jtcohen6
Copy link
Contributor

@callum-mcdata You're the best! Was just reviewing this morning to make sure we're not missing any relevant docs updates

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[CT-1618] [Feature] Metric timestamp and time_grains should be optional
3 participants