dagster icon indicating copy to clipboard operation
dagster copied to clipboard

[DS][9/n] Add lookback_timedelta to InLatestTimeWindow condition

Open OwenKephart opened this issue 9 months ago • 1 comments

Summary & Motivation

This diverges slightly from past conversations we've had about separating out this functionality into two separate conditions.

That said, I think this definition actually ends up making more sense overall.

The most annoying bit with the originally-proposed definition is that if you define a "RecentPartitionsCondition" to mean "all partitions within the time window (current_time - 3 days, current_time)" you end up with the annoying result that this time range actually only contains 2 full daily partitions, as you are inevitably going to call this function at some time other than "exactly midnight", meaning that you have (partital_day, full_day, full_day, part of today) as your range, leaving you with only 2 partitions. I think this would be a persistant annoyance for users that would simply want to express "the last 3 daily partitions" in a natural way.

I think this formulation ends up being more intuitive, and has the added bonus of consolidating two very-similar concepts into a single condition.

This definition also handles partitions deifnitions with an end date nicely, which is nice.

How I Tested These Changes

OwenKephart avatar Apr 30 '24 00:04 OwenKephart

  • #21511 Graphite: 2 dependent PRs (#21512 Graphite, #21520 Graphite)
  • #21510 Graphite
  • #21508 Graphite 👈
  • #21507 Graphite
  • #21505 Graphite
  • #21504 Graphite
  • #21503 Graphite
  • #21502 Graphite
  • #21501 Graphite
  • #21500 Graphite
  • #21499 Graphite
  • master

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @OwenKephart and the rest of your teammates on Graphite Graphite

OwenKephart avatar Apr 30 '24 00:04 OwenKephart

Merge activity

  • May 3, 5:31 PM EDT: @OwenKephart started a stack merge that includes this pull request via Graphite.
  • May 3, 5:48 PM EDT: Graphite rebased this pull request as part of a merge.
  • May 3, 5:49 PM EDT: @OwenKephart merged this pull request with Graphite.

OwenKephart avatar May 03 '24 21:05 OwenKephart