Skip to content

Commit

Permalink
make get_stream_slice public
Browse files Browse the repository at this point in the history
  • Loading branch information
erohmensing committed Dec 11, 2022
1 parent c18748e commit 9170fe5
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ def get_first_record(self, stream: Stream) -> StreamData:
:return: StreamData containing the first record in the stream
"""
# Some streams need a stream slice to read records (e.g. if they have a SubstreamSlicer)
stream_slice = self._get_stream_slice(stream)
stream_slice = self.get_stream_slice(stream)
records = stream.read_records(sync_mode=SyncMode.full_refresh, stream_slice=stream_slice)
next(records)

@staticmethod
def _get_stream_slice(stream: Stream) -> Optional[Mapping[str, Any]]:
def get_stream_slice(stream: Stream) -> Optional[Mapping[str, Any]]:
"""
Gets the first stream_slice from a given stream's stream_slices.
Expand Down

0 comments on commit 9170fe5

Please sign in to comment.