Skip to content

Commit

Permalink
revert stream slicer from concurrent package
Browse files Browse the repository at this point in the history
  • Loading branch information
maxi297 committed Nov 12, 2024
1 parent 35290eb commit 9e44ed4
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 25 deletions.
18 changes: 14 additions & 4 deletions airbyte_cdk/sources/declarative/stream_slicers/stream_slicer.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,18 @@
# Copyright (c) 2023 Airbyte, Inc., all rights reserved.
#

from abc import ABC
from abc import abstractmethod
from dataclasses import dataclass
from typing import Iterable

from airbyte_cdk.sources.declarative.requesters.request_options.request_options_provider import (
RequestOptionsProvider,
)
from airbyte_cdk.sources.streams.concurrent.partitions.stream_slicer import StreamSlicer as ConcurrentStreamSlicer
from airbyte_cdk.sources.types import StreamSlice


class StreamSlicer(ConcurrentStreamSlicer, RequestOptionsProvider, ABC):
@dataclass
class StreamSlicer(RequestOptionsProvider):
"""
Slices the stream into a subset of records.
Slices enable state checkpointing and data retrieval parallelization.
Expand All @@ -19,4 +22,11 @@ class StreamSlicer(ConcurrentStreamSlicer, RequestOptionsProvider, ABC):
See the stream slicing section of the docs for more information.
"""
pass

@abstractmethod
def stream_slices(self) -> Iterable[StreamSlice]:
"""
Defines stream slices
:return: List of stream slices
"""
21 changes: 0 additions & 21 deletions airbyte_cdk/sources/streams/concurrent/partitions/stream_slicer.py

This file was deleted.

0 comments on commit 9e44ed4

Please sign in to comment.