Skip to content

Commit

Permalink
add default_sink_class type hint SQLSink
Browse files Browse the repository at this point in the history
  • Loading branch information
BuzzCutNorman committed Jul 20, 2023
1 parent e3d31e9 commit c50a933
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion singer_sdk/target_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -663,6 +666,7 @@ def add_sqlsink(
)
sink.setup()
self._sinks_active[stream_name] = sink

return sink

def get_sink(
Expand All @@ -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
Expand Down

0 comments on commit c50a933

Please sign in to comment.