Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Check if replication key is timestamp before using start_date as default #1734

Draft
wants to merge 15 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
15 commits
Select commit Hold shift + click to select a range
a2d5565
added start_date to sqlite_sample_db_config
BuzzCutNorman May 24, 2023
09900f4
check if is_timestamp_replication_key before using start_date
BuzzCutNorman May 24, 2023
f25764e
Merge branch 'main' into 1677-fix-do-not-use-start-date-with-non-date…
BuzzCutNorman May 25, 2023
87f552a
Merge branch 'main' into 1677-fix-do-not-use-start-date-with-non-date…
BuzzCutNorman Jun 5, 2023
d1ba9be
Merge branch 'main' into 1677-fix-do-not-use-start-date-with-non-date…
Jun 7, 2023
c6c9ea5
Merge branch 'main' into 1677-fix-do-not-use-start-date-with-non-date…
Jun 7, 2023
fa167ee
Merge branch 'main' into 1677-fix-do-not-use-start-date-with-non-date…
BuzzCutNorman Jun 21, 2023
630fb48
Merge branch 'main' of https://github.com/BuzzCutNorman/sdk into 1677…
BuzzCutNorman Jun 27, 2023
8174e89
Merge branch 'main' into 1677-fix-do-not-use-start-date-with-non-date…
edgarrmondragon Jul 11, 2023
f46e8a5
Merge branch 'main' into 1677-fix-do-not-use-start-date-with-non-date…
BuzzCutNorman Jul 24, 2023
0737fc1
Merge branch 'main' into 1677-fix-do-not-use-start-date-with-non-date…
BuzzCutNorman Aug 4, 2023
2dcbbce
Merge branch 'main' into 1677-fix-do-not-use-start-date-with-non-date…
BuzzCutNorman Aug 8, 2023
0df7421
Merge branch 'main' into 1677-fix-do-not-use-start-date-with-non-date…
edgarrmondragon May 6, 2024
86ce7a2
Merge branch 'main' into 1677-fix-do-not-use-start-date-with-non-date…
edgarrmondragon Jul 30, 2024
6a6f850
Merge branch 'main' into 1677-fix-do-not-use-start-date-with-non-date…
BuzzCutNorman Jul 31, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion singer_sdk/streams/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
5 changes: 4 additions & 1 deletion tests/samples/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading