Skip to content

Commit

Permalink
Merge branch 'main' into ci/fix-gitlab-missing-pk
Browse files Browse the repository at this point in the history
  • Loading branch information
edgarrmondragon authored Sep 1, 2022
2 parents 9a81355 + b3efc47 commit d2b1ec0
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 39 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
singer_sdk.exceptions.RecordsWithoutSchemaException
==================================================

.. currentmodule:: singer_sdk.exceptions

.. autoclass:: RecordsWithoutSchemaException
:members:
2 changes: 1 addition & 1 deletion docs/reference.rst
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ Exception Types
exceptions.InvalidStreamSortException
exceptions.MapExpressionError
exceptions.MaxRecordsLimitException
exceptions.RecordsWitoutSchemaException
exceptions.RecordsWithoutSchemaException
exceptions.RetriableAPIError
exceptions.StreamMapConfigError
exceptions.TapStreamConnectionFailure
Expand Down
44 changes: 13 additions & 31 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ pyarrow = "^9.0.0"
freezegun = "^1.2.2"
viztracer = "^0.15.4"
requests-mock = "^1.10.0"
sqlalchemy2-stubs = {version = "^0.0.2a26", allow-prereleases = true}
sqlalchemy2-stubs = {version = "^0.0.2a27", allow-prereleases = true}
types-python-dateutil = "^2.8.19"
types-requests = "^2.28.9"
coverage = {extras = ["toml"], version = "^6.4"}
Expand Down
2 changes: 1 addition & 1 deletion singer_sdk/exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class MaxRecordsLimitException(Exception):
"""Exception to raise if the maximum number of allowable records is exceeded."""


class RecordsWitoutSchemaException(Exception):
class RecordsWithoutSchemaException(Exception):
"""Raised if a target receives RECORD messages prior to a SCHEMA message."""


Expand Down
11 changes: 6 additions & 5 deletions singer_sdk/target_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
from joblib import Parallel, delayed, parallel_backend

from singer_sdk.cli import common_options
from singer_sdk.exceptions import RecordsWitoutSchemaException
from singer_sdk.exceptions import RecordsWithoutSchemaException
from singer_sdk.helpers._classproperty import classproperty
from singer_sdk.helpers._compat import final
from singer_sdk.helpers.capabilities import CapabilitiesEnum, PluginCapabilities
Expand Down Expand Up @@ -135,7 +135,7 @@ def get_sink(
sink depending on the values within the `record` object. Otherwise, please see
`default_sink_class` property and/or the `get_sink_class()` method.
Raises :class:`singer_sdk.exceptions.RecordsWitoutSchemaException` if sink does
Raises :class:`singer_sdk.exceptions.RecordsWithoutSchemaException` if sink does
not exist and schema is not sent.
Args:
Expand Down Expand Up @@ -233,16 +233,17 @@ def add_sink(
return result

def _assert_sink_exists(self, stream_name: str) -> None:
"""Raise a RecordsWitoutSchemaException exception if stream doesn't exist.
"""Raise a RecordsWithoutSchemaException exception if stream doesn't exist.
Args:
stream_name: TODO
Raises:
RecordsWitoutSchemaException: If sink does not exist and schema is not sent.
RecordsWithoutSchemaException: If sink does not exist and schema
is not sent.
"""
if not self.sink_exists(stream_name):
raise RecordsWitoutSchemaException(
raise RecordsWithoutSchemaException(
f"A record for stream '{stream_name}' was encountered before a "
"corresponding schema."
)
Expand Down

0 comments on commit d2b1ec0

Please sign in to comment.