diff --git a/singer_sdk/target_base.py b/singer_sdk/target_base.py index 635861256..c8c3646e4 100644 --- a/singer_sdk/target_base.py +++ b/singer_sdk/target_base.py @@ -575,6 +575,9 @@ def get_singer_command(cls: type[Target]) -> click.Command: class SQLTarget(Target): """Target implementation for SQL destinations.""" + # Sink class used to initialize new SQL sink from their stream schema. + default_sink_class: SQLSink + _target_connector: SQLConnector | None = None @property @@ -663,6 +666,7 @@ def add_sqlsink( ) sink.setup() self._sinks_active[stream_name] = sink + return sink def get_sink( @@ -672,7 +676,7 @@ def get_sink( record: dict | None = None, schema: dict | None = None, key_properties: list[str] | None = None, - ) -> SQLSink: + ) -> Sink | SQLSink: """Return a sink for the given stream name. A new sink will be created if `schema` is provided and if either `schema` or