Kate Liu
07/16/2026, 3:34 AMEdgar RamĂrez (Arch.dev)
07/16/2026, 4:05 AMKate Liu
07/16/2026, 10:22 PMdylan_just
07/16/2026, 11:43 PMDron Adhikari
07/17/2026, 11:53 AMDron Adhikari
07/17/2026, 12:08 PMdef apply_query_filters(
self,
query: selectable.Select,
table: sa.Table,
*,
context: Context | None = None,
) -> selectable.Select:
"""Apply WHERE and ORDER BY clauses to the query.
By default, this method applies a replication filter to the query
and orders the results by the replication key, if a replication key is set.
Args:
query: The SQLAlchemy Select object.
table: The SQLAlchemy Table object.
context: The context object.
Returns:
A SQLAlchemy Select object.
"""
if self.replication_key:
column = table.columns[self.replication_key]
order_by = (
sa.nulls_first(column.asc())
if self.supports_nulls_first
else column.asc()
)
query = query.order_by(order_by)
start_val = self.get_starting_replication_key_value(context)
if start_val is not None:
query = query.where(column >= start_val)
return queryKate Liu
07/17/2026, 11:31 PMKate Liu
07/17/2026, 11:36 PMdylan_just
07/18/2026, 6:32 AMKate Liu
07/19/2026, 12:06 AMdylan_just
07/19/2026, 1:25 AMmeltano state merge and pass it the tap and a state json string that sets the state to where you want it. You'll need to calculate what that state should be, though.
You could do this:
• meltano state read
• Parse the result
• Subtract 2 hours from that
• meltano state merge to set the new value
So, it's not an automatic thing like an "overlap" setting, but it should help with this scenario.
Anyway, this process of using "merge" to set the state to an earlier value is what I mean by "rewinding" the state. It can be useful in other scenarios e.g. if you want to re-ingest a table from scratch, or if you added a column to your source data and want to re-ingest old rows to capture that.Dron Adhikari
07/19/2026, 4:57 PM___updated_at_timestamp__,_ and set this column for state replication key, it allows for taking into account the rows always with respect to when they were actually last written in to the source