diff --git a/singer_sdk/streams/core.py b/singer_sdk/streams/core.py index ed9052ae0..2bb5afdac 100644 --- a/singer_sdk/streams/core.py +++ b/singer_sdk/streams/core.py @@ -409,7 +409,7 @@ def _write_starting_replication_value(self, context: types.Context | None) -> No # Use start_date if it is more recent than the replication_key state start_date_value: str | None = self.config.get("start_date") - if start_date_value: + if start_date_value and self.is_timestamp_replication_key: if not value: value = start_date_value else: diff --git a/tests/samples/conftest.py b/tests/samples/conftest.py index 90cb80dec..3f026b70f 100644 --- a/tests/samples/conftest.py +++ b/tests/samples/conftest.py @@ -97,7 +97,10 @@ def path_to_sample_data_db(tmp_path: Path) -> Path: @pytest.fixture def sqlite_sample_db_config(path_to_sample_data_db: Path) -> dict: """Get configuration dictionary for target-csv.""" - return {"path_to_db": str(path_to_sample_data_db)} + return { + "path_to_db": str(path_to_sample_data_db), + "start_date": "2010-01-01T00:00:00Z", + } @pytest.fixture