airbyte_cdk.sources.streams.concurrent.partitions.stream_slicer

 1# Copyright (c) 2024 Airbyte, Inc., all rights reserved.
 2
 3from abc import ABC, abstractmethod
 4from typing import Iterable
 5
 6from airbyte_cdk.sources.types import StreamSlice
 7
 8
 9class StreamSlicer(ABC):
10    """
11    Slices the stream into chunks that can be fetched independently. Slices enable state checkpointing and data retrieval parallelization.
12    """
13
14    @abstractmethod
15    def stream_slices(self) -> Iterable[StreamSlice]:
16        """
17        Defines stream slices
18
19        :return: An iterable of stream slices
20        """
21        pass
class StreamSlicer(abc.ABC):
10class StreamSlicer(ABC):
11    """
12    Slices the stream into chunks that can be fetched independently. Slices enable state checkpointing and data retrieval parallelization.
13    """
14
15    @abstractmethod
16    def stream_slices(self) -> Iterable[StreamSlice]:
17        """
18        Defines stream slices
19
20        :return: An iterable of stream slices
21        """
22        pass

Slices the stream into chunks that can be fetched independently. Slices enable state checkpointing and data retrieval parallelization.

@abstractmethod
def stream_slices(self) -> Iterable[airbyte_cdk.StreamSlice]:
15    @abstractmethod
16    def stream_slices(self) -> Iterable[StreamSlice]:
17        """
18        Defines stream slices
19
20        :return: An iterable of stream slices
21        """
22        pass

Defines stream slices

Returns

An iterable of stream slices