class singer_sdk.SQLStream#

Base class for SQLAlchemy-based streams.

__init__(tap: Tap, catalog_entry: dict, connector: SQLConnector | None = None) None#

Initialize the database stream.

If connector is omitted, a new connector will be created.

  • tap – The parent tap object.

  • catalog_entry – Catalog entry dict.

  • connector – Optional connector to reuse.

property connector: SQLConnector#

Return a connector object.


The connector object.


alias of SQLConnector

property fully_qualified_name: str#

Generate the fully qualified version of the table name.


ValueError – If table_name is not able to be detected.


The fully qualified name.

get_records(context: dict | None) Iterable[dict[str, Any]]#

Return a generator of record-type dictionary objects.

If the stream has a replication_key value defined, records will be sorted by the incremental key. If the stream also has an available starting bookmark, the records will be filtered for values greater than or equal to the bookmark value.


context – If partition context is provided, will read specifically from this data slice.


One dict per record.


NotImplementedError – If partition is passed in context and the stream does not support partitioning.

get_selected_schema() dict#

Return a copy of the Stream JSON schema, dropping any fields not selected.


A dictionary containing a copy of the Stream JSON schema, filtered to any selection criteria.

property is_sorted: bool#

Expect stream to be sorted.

When True, incremental streams will attempt to resume if unexpectedly interrupted.


True if stream is sorted. Defaults to False.

property metadata: MetadataMapping#

Return the Singer metadata.

Metadata from an input catalog will override standard metadata.


Metadata object as specified in the Singer spec.

property primary_keys: list[str] | None#

Get primary keys from the catalog entry definition.


A list of primary key(s) for the stream.

property schema: dict#

Return metadata object (dict) as specified in the Singer spec.

Metadata from an input catalog will override standard metadata.


The schema object.

property tap_stream_id: str#

Return the unique ID used by the tap to identify this stream.

Generally, this is the same value as in

In rare cases, such as for database types with multi-part names, this may be slightly different from


The unique tap stream ID as a string.