dlt.extract.incremental.lag
DATE_STR_FORMATS
Detected formats of string cursors that are dates and not datetimes
apply_lag
def apply_lag(lag: float,
initial_value: TCursorValue,
last_value: TCursorValue,
last_value_func: LastValueFunc[TCursorValue],
cursor_type: Optional[Type[Any]] = None) -> TCursorValue
Applies lag to last_value but prevents it to cross initial_value: observing order of last_value_func
Lag is in days for a date cursor and in seconds for a datetime one, as declared by cursor_type.
apply_lag_with_suppression
def apply_lag_with_suppression(
lag: Optional[float],
last_value_func: LastValueFunc[TCursorValue],
initial_value: Optional[TCursorValue],
end_value: Optional[TCursorValue],
last_value: Optional[TCursorValue],
resource_name: Optional[str] = None,
cursor_type: Optional[Type[Any]] = None) -> Optional[TCursorValue]
Conditionally apply lag to last_value, mirroring Incremental.last_value rules.
Returns last_value unchanged when:
lagis falsy orlast_valueis Nonelast_value_funcis notmaxormin(logs warning)end_valueis set (lag auto-deactivated; logs info)