From cb163bf05aa1357e6b140bdbbaca5ebe9a11743f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edgar=20Ram=C3=ADrez=20Mondrag=C3=B3n?= <16805946+edgarrmondragon@users.noreply.github.com> Date: Tue, 30 Jul 2024 13:21:58 -0600 Subject: [PATCH] fix(taps): Check replication method instead of key to determine if a SQL stream is sorted (#2418) --- singer_sdk/streams/sql.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/singer_sdk/streams/sql.py b/singer_sdk/streams/sql.py index 04a3f9d17..954159885 100644 --- a/singer_sdk/streams/sql.py +++ b/singer_sdk/streams/sql.py @@ -11,7 +11,7 @@ import singer_sdk.helpers._catalog as catalog from singer_sdk._singerlib import CatalogEntry, MetadataMapping from singer_sdk.connectors import SQLConnector -from singer_sdk.streams.core import Stream +from singer_sdk.streams.core import REPLICATION_INCREMENTAL, Stream if t.TYPE_CHECKING: from singer_sdk.helpers.types import Context @@ -227,7 +227,7 @@ def is_sorted(self) -> bool: Returns: `True` if stream is sorted. Defaults to `False`. """ - return self.replication_key is not None + return self.replication_method == REPLICATION_INCREMENTAL __all__ = ["SQLConnector", "SQLStream"]