airbyte-source-iterable 0.6.20__py3-none-any.whl → 0.6.21__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {airbyte_source_iterable-0.6.20.dist-info → airbyte_source_iterable-0.6.21.dist-info}/METADATA +1 -1
- {airbyte_source_iterable-0.6.20.dist-info → airbyte_source_iterable-0.6.21.dist-info}/RECORD +7 -7
- source_iterable/components.py +1 -0
- source_iterable/source.py +2 -0
- source_iterable/streams.py +5 -8
- {airbyte_source_iterable-0.6.20.dist-info → airbyte_source_iterable-0.6.21.dist-info}/WHEEL +0 -0
- {airbyte_source_iterable-0.6.20.dist-info → airbyte_source_iterable-0.6.21.dist-info}/entry_points.txt +0 -0
{airbyte_source_iterable-0.6.20.dist-info → airbyte_source_iterable-0.6.21.dist-info}/RECORD
RENAMED
@@ -1,5 +1,5 @@
|
|
1
1
|
source_iterable/__init__.py,sha256=8WKQT800ggxG1vGPoA_ZHUkozwEM7qMhGMhzEPCdA4o,65
|
2
|
-
source_iterable/components.py,sha256=
|
2
|
+
source_iterable/components.py,sha256=u1jHId7HeG6JQmxENL_7uKlxMqfaBF6dgRuazHn1_c0,806
|
3
3
|
source_iterable/manifest.yaml,sha256=BL0mAODdqpiRycEG5igczmkCA7y2VhDnqCAHrsPbUc4,14136
|
4
4
|
source_iterable/run.py,sha256=-Bvz772Z7iJWExDoJS7chxv725hG4e9e5Engrtp66iE,236
|
5
5
|
source_iterable/schemas/campaigns.json,sha256=FONoPuz_4aRat8OZzhj7BcHFAqetpBYUDmOZfroCu7I,2494
|
@@ -21,11 +21,11 @@ source_iterable/schemas/metadata.json,sha256=ioQcAKtObfsY-TonvGA75Q0BJwD7oBNgRAd
|
|
21
21
|
source_iterable/schemas/templates.json,sha256=TLKmKP0qS18umiGHuS1MZ2Wh_vvxF1XuMAIfKpbgFyU,1156
|
22
22
|
source_iterable/schemas/users.json,sha256=CHqA30cnsTXfI-M0n54NwVaaZEO12tt_IgQ9yPHNcXU,14569
|
23
23
|
source_iterable/slice_generators.py,sha256=neRuWD52Xnr84KvWQ0kjaErR44sOKjxIyLCNeofohzE,6482
|
24
|
-
source_iterable/source.py,sha256=
|
24
|
+
source_iterable/source.py,sha256=Yv1A_cyuUrsTGsdqnJLUzstcEtyjSwK9iKy4mlA9mis,4539
|
25
25
|
source_iterable/spec.json,sha256=y5_YFTkPPtxjvzGtaZZql90Tc37fyZZpQKXFGPL_cYE,1009
|
26
|
-
source_iterable/streams.py,sha256=
|
26
|
+
source_iterable/streams.py,sha256=64oWzx0DUgMaDgHQaAd6gfWRJbRyd3jdnbNVC5zSWtw,19937
|
27
27
|
source_iterable/utils.py,sha256=08uzNpJGDd3uogybhfAtrqBz4lFsldURWyt5OFpz79s,562
|
28
|
-
airbyte_source_iterable-0.6.
|
29
|
-
airbyte_source_iterable-0.6.
|
30
|
-
airbyte_source_iterable-0.6.
|
31
|
-
airbyte_source_iterable-0.6.
|
28
|
+
airbyte_source_iterable-0.6.21.dist-info/METADATA,sha256=wT3vx9eW_TP1DIumWokhAW8s8A5ZiAQhZSWsarBRoIY,5331
|
29
|
+
airbyte_source_iterable-0.6.21.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
|
30
|
+
airbyte_source_iterable-0.6.21.dist-info/entry_points.txt,sha256=pjzrNtsOX3jW37IK0U5pSmLiraiuLTPr5aB5-hBXpAo,59
|
31
|
+
airbyte_source_iterable-0.6.21.dist-info/RECORD,,
|
source_iterable/components.py
CHANGED
source_iterable/source.py
CHANGED
@@ -47,6 +47,7 @@ from .streams import (
|
|
47
47
|
WebPushSendSkip,
|
48
48
|
)
|
49
49
|
|
50
|
+
|
50
51
|
"""
|
51
52
|
This file provides the necessary constructs to interpret a provided declarative YAML configuration file into
|
52
53
|
source connector.
|
@@ -54,6 +55,7 @@ source connector.
|
|
54
55
|
WARNING: Do not modify this file.
|
55
56
|
"""
|
56
57
|
|
58
|
+
|
57
59
|
# Declarative Source
|
58
60
|
class SourceIterable(YamlDeclarativeSource):
|
59
61
|
def __init__(self):
|
source_iterable/streams.py
CHANGED
@@ -10,18 +10,20 @@ from typing import Any, Dict, Iterable, List, Mapping, MutableMapping, Optional,
|
|
10
10
|
|
11
11
|
import pendulum
|
12
12
|
import requests
|
13
|
+
from pendulum.datetime import DateTime
|
14
|
+
from requests import HTTPError
|
15
|
+
from requests.exceptions import ChunkedEncodingError
|
16
|
+
|
13
17
|
from airbyte_cdk.models import SyncMode
|
14
18
|
from airbyte_cdk.sources.streams.availability_strategy import AvailabilityStrategy
|
15
19
|
from airbyte_cdk.sources.streams.core import CheckpointMixin, package_name_from_class
|
16
20
|
from airbyte_cdk.sources.streams.http import HttpStream
|
17
21
|
from airbyte_cdk.sources.streams.http.exceptions import DefaultBackoffException, UserDefinedBackoffException
|
18
22
|
from airbyte_cdk.sources.utils.schema_helpers import ResourceSchemaLoader
|
19
|
-
from pendulum.datetime import DateTime
|
20
|
-
from requests import HTTPError
|
21
|
-
from requests.exceptions import ChunkedEncodingError
|
22
23
|
from source_iterable.slice_generators import AdjustableSliceGenerator, RangeSliceGenerator, StreamSlice
|
23
24
|
from source_iterable.utils import dateutil_parse
|
24
25
|
|
26
|
+
|
25
27
|
EVENT_ROWS_LIMIT = 200
|
26
28
|
CAMPAIGNS_PER_REQUEST = 20
|
27
29
|
|
@@ -202,7 +204,6 @@ class IterableExportStream(IterableStream, CheckpointMixin, ABC):
|
|
202
204
|
stream_slice: StreamSlice,
|
203
205
|
next_page_token: Mapping[str, Any] = None,
|
204
206
|
) -> MutableMapping[str, Any]:
|
205
|
-
|
206
207
|
params = super().request_params(stream_state=stream_state)
|
207
208
|
params.update(
|
208
209
|
{
|
@@ -250,7 +251,6 @@ class IterableExportStream(IterableStream, CheckpointMixin, ABC):
|
|
250
251
|
cursor_field: List[str] = None,
|
251
252
|
stream_state: Mapping[str, Any] = None,
|
252
253
|
) -> Iterable[Optional[StreamSlice]]:
|
253
|
-
|
254
254
|
start_datetime = self.get_start_date(stream_state)
|
255
255
|
return [StreamSlice(start_datetime, self._end_date or pendulum.now("UTC"))]
|
256
256
|
|
@@ -268,7 +268,6 @@ class IterableExportStreamRanged(IterableExportStream, ABC):
|
|
268
268
|
cursor_field: List[str] = None,
|
269
269
|
stream_state: Mapping[str, Any] = None,
|
270
270
|
) -> Iterable[Optional[StreamSlice]]:
|
271
|
-
|
272
271
|
start_datetime = self.get_start_date(stream_state)
|
273
272
|
|
274
273
|
return RangeSliceGenerator(start_datetime, self._end_date)
|
@@ -303,7 +302,6 @@ class IterableExportStreamAdjustableRange(IterableExportStream, ABC):
|
|
303
302
|
cursor_field: List[str] = None,
|
304
303
|
stream_state: Mapping[str, Any] = None,
|
305
304
|
) -> Iterable[Optional[StreamSlice]]:
|
306
|
-
|
307
305
|
start_datetime = self.get_start_date(stream_state)
|
308
306
|
self._adjustable_generator = AdjustableSliceGenerator(start_datetime, self._end_date)
|
309
307
|
return self._adjustable_generator
|
@@ -318,7 +316,6 @@ class IterableExportStreamAdjustableRange(IterableExportStream, ABC):
|
|
318
316
|
start_time = pendulum.now()
|
319
317
|
for _ in range(self.CHUNKED_ENCODING_ERROR_RETRIES):
|
320
318
|
try:
|
321
|
-
|
322
319
|
self.logger.info(
|
323
320
|
f"Processing slice of {(stream_slice.end_date - stream_slice.start_date).total_days()} days for stream {self.name}"
|
324
321
|
)
|
File without changes
|
File without changes
|