sdk
sdk copied to clipboard
fix: `_write_starting_replication_value` for `_sync_batches`
Singer SDK Version
0.44.3
Is this a regression?
- [ ] Yes
Python Version
NA
Bug scope
Taps (catalog, state, etc.)
Operating System
Ubuntu 22.04
Description
This is currently present for _sync_records, but not for _sync_batches. This means that given no state, if start_date is set in config and get_starting_timestamp is called from a get_batches implementation, it does not return an initial timestamp for the value of start_date.
Link to Slack/Linen
No response
(sorry, not sure if this is a bug report or feature request)
The workaround is fairly simple:
if start_date := self.get_starting_timestamp(context) or (
"start_date" in self.config
and datetime.fromisoformat(self.config["start_date"])
):
payload["startDateTime"] = start_date.strftime(r"%Y-%m-%d %H:%M:%S")
(sorry, not sure if this is a bug report or feature request)
I would probably consider it a bug.
The workaround is fairly simple:
You mean on the tap implementation side?
You mean on the tap implementation side?
Yep.