airbyte-source-iterable 0.6.55.dev202603101147__tar.gz → 0.7.0__tar.gz
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.55.dev202603101147 → airbyte_source_iterable-0.7.0}/PKG-INFO +1 -1
- {airbyte_source_iterable-0.6.55.dev202603101147 → airbyte_source_iterable-0.7.0}/pyproject.toml +1 -1
- {airbyte_source_iterable-0.6.55.dev202603101147 → airbyte_source_iterable-0.7.0}/source_iterable/manifest.yaml +12 -0
- {airbyte_source_iterable-0.6.55.dev202603101147 → airbyte_source_iterable-0.7.0}/source_iterable/source.py +3 -3
- {airbyte_source_iterable-0.6.55.dev202603101147 → airbyte_source_iterable-0.7.0}/source_iterable/spec.json +3 -3
- {airbyte_source_iterable-0.6.55.dev202603101147 → airbyte_source_iterable-0.7.0}/source_iterable/streams.py +4 -4
- {airbyte_source_iterable-0.6.55.dev202603101147 → airbyte_source_iterable-0.7.0}/README.md +0 -0
- {airbyte_source_iterable-0.6.55.dev202603101147 → airbyte_source_iterable-0.7.0}/source_iterable/__init__.py +0 -0
- {airbyte_source_iterable-0.6.55.dev202603101147 → airbyte_source_iterable-0.7.0}/source_iterable/components.py +0 -0
- {airbyte_source_iterable-0.6.55.dev202603101147 → airbyte_source_iterable-0.7.0}/source_iterable/run.py +0 -0
- {airbyte_source_iterable-0.6.55.dev202603101147 → airbyte_source_iterable-0.7.0}/source_iterable/schemas/campaigns.json +0 -0
- {airbyte_source_iterable-0.6.55.dev202603101147 → airbyte_source_iterable-0.7.0}/source_iterable/schemas/campaigns_metrics.json +0 -0
- {airbyte_source_iterable-0.6.55.dev202603101147 → airbyte_source_iterable-0.7.0}/source_iterable/schemas/channels.json +0 -0
- {airbyte_source_iterable-0.6.55.dev202603101147 → airbyte_source_iterable-0.7.0}/source_iterable/schemas/email_bounce.json +0 -0
- {airbyte_source_iterable-0.6.55.dev202603101147 → airbyte_source_iterable-0.7.0}/source_iterable/schemas/email_click.json +0 -0
- {airbyte_source_iterable-0.6.55.dev202603101147 → airbyte_source_iterable-0.7.0}/source_iterable/schemas/email_complaint.json +0 -0
- {airbyte_source_iterable-0.6.55.dev202603101147 → airbyte_source_iterable-0.7.0}/source_iterable/schemas/email_open.json +0 -0
- {airbyte_source_iterable-0.6.55.dev202603101147 → airbyte_source_iterable-0.7.0}/source_iterable/schemas/email_send.json +0 -0
- {airbyte_source_iterable-0.6.55.dev202603101147 → airbyte_source_iterable-0.7.0}/source_iterable/schemas/email_send_skip.json +0 -0
- {airbyte_source_iterable-0.6.55.dev202603101147 → airbyte_source_iterable-0.7.0}/source_iterable/schemas/email_subscribe.json +0 -0
- {airbyte_source_iterable-0.6.55.dev202603101147 → airbyte_source_iterable-0.7.0}/source_iterable/schemas/email_unsubscribe.json +0 -0
- {airbyte_source_iterable-0.6.55.dev202603101147 → airbyte_source_iterable-0.7.0}/source_iterable/schemas/events.json +0 -0
- {airbyte_source_iterable-0.6.55.dev202603101147 → airbyte_source_iterable-0.7.0}/source_iterable/schemas/list_users.json +0 -0
- {airbyte_source_iterable-0.6.55.dev202603101147 → airbyte_source_iterable-0.7.0}/source_iterable/schemas/lists.json +0 -0
- {airbyte_source_iterable-0.6.55.dev202603101147 → airbyte_source_iterable-0.7.0}/source_iterable/schemas/message_types.json +0 -0
- {airbyte_source_iterable-0.6.55.dev202603101147 → airbyte_source_iterable-0.7.0}/source_iterable/schemas/metadata.json +0 -0
- {airbyte_source_iterable-0.6.55.dev202603101147 → airbyte_source_iterable-0.7.0}/source_iterable/schemas/templates.json +0 -0
- {airbyte_source_iterable-0.6.55.dev202603101147 → airbyte_source_iterable-0.7.0}/source_iterable/schemas/users.json +0 -0
- {airbyte_source_iterable-0.6.55.dev202603101147 → airbyte_source_iterable-0.7.0}/source_iterable/slice_generators.py +0 -0
- {airbyte_source_iterable-0.6.55.dev202603101147 → airbyte_source_iterable-0.7.0}/source_iterable/utils.py +0 -0
{airbyte_source_iterable-0.6.55.dev202603101147 → airbyte_source_iterable-0.7.0}/pyproject.toml
RENAMED
|
@@ -3,7 +3,7 @@ requires = [ "poetry-core>=1.0.0",]
|
|
|
3
3
|
build-backend = "poetry.core.masonry.api"
|
|
4
4
|
|
|
5
5
|
[tool.poetry]
|
|
6
|
-
version = "0.
|
|
6
|
+
version = "0.7.0"
|
|
7
7
|
name = "airbyte-source-iterable"
|
|
8
8
|
description = "Source implementation for Iterable."
|
|
9
9
|
authors = [ "Airbyte <contact@airbyte.io>",]
|
|
@@ -27,6 +27,18 @@ spec:
|
|
|
27
27
|
pattern: ^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}Z$
|
|
28
28
|
order: 1
|
|
29
29
|
format: "date-time"
|
|
30
|
+
lookback_window:
|
|
31
|
+
type: "integer"
|
|
32
|
+
title: "Lookback Window (Minutes)"
|
|
33
|
+
description: >-
|
|
34
|
+
Number of minutes to re-read from the current time when determining the end of each sync window
|
|
35
|
+
for export-based streams. This accounts for eventual consistency delays in Iterable's Export API,
|
|
36
|
+
preventing silent data loss for events not yet indexed. Increase this value if you observe missing
|
|
37
|
+
events near the end of sync windows.
|
|
38
|
+
default: 5
|
|
39
|
+
minimum: 0
|
|
40
|
+
examples: [5, 10, 15]
|
|
41
|
+
order: 2
|
|
30
42
|
type: DeclarativeSource
|
|
31
43
|
check:
|
|
32
44
|
type: CheckStream
|
|
@@ -67,9 +67,9 @@ class SourceIterable(YamlDeclarativeSource):
|
|
|
67
67
|
authenticator = TokenAuthenticator(token=config["api_key"], auth_header="Api-Key", auth_method="")
|
|
68
68
|
# end date is provided for integration tests only
|
|
69
69
|
start_date, end_date = config["start_date"], config.get("end_date")
|
|
70
|
-
|
|
71
|
-
date_range = {"start_date": start_date, "end_date": end_date, "
|
|
72
|
-
# CampaignsMetrics extends IterableStream (not IterableExportStream) and does not accept
|
|
70
|
+
lookback_window = config.get("lookback_window", 5)
|
|
71
|
+
date_range = {"start_date": start_date, "end_date": end_date, "lookback_window": lookback_window}
|
|
72
|
+
# CampaignsMetrics extends IterableStream (not IterableExportStream) and does not accept lookback_window
|
|
73
73
|
campaigns_date_range = {"start_date": start_date, "end_date": end_date}
|
|
74
74
|
|
|
75
75
|
# TODO: migrate streams below to low code as slicer logic will be migrated to generator based
|
|
@@ -22,10 +22,10 @@
|
|
|
22
22
|
"order": 1,
|
|
23
23
|
"format": "date-time"
|
|
24
24
|
},
|
|
25
|
-
"
|
|
25
|
+
"lookback_window": {
|
|
26
26
|
"type": "integer",
|
|
27
|
-
"title": "
|
|
28
|
-
"description": "Number of minutes to
|
|
27
|
+
"title": "Lookback Window (Minutes)",
|
|
28
|
+
"description": "Number of minutes to re-read from the current time when determining the end of each sync window for export-based streams. This accounts for eventual consistency delays in Iterable's Export API, preventing silent data loss for events not yet indexed. Increase this value if you observe missing events near the end of sync windows.",
|
|
29
29
|
"default": 5,
|
|
30
30
|
"minimum": 0,
|
|
31
31
|
"examples": [5, 10, 15],
|
|
@@ -153,11 +153,11 @@ class IterableExportStream(IterableStream, CheckpointMixin, ABC):
|
|
|
153
153
|
def state(self, value: MutableMapping[str, Any]):
|
|
154
154
|
self._state = value
|
|
155
155
|
|
|
156
|
-
def __init__(self, start_date=None, end_date=None,
|
|
156
|
+
def __init__(self, start_date=None, end_date=None, lookback_window: int = 5, **kwargs):
|
|
157
157
|
super().__init__(**kwargs)
|
|
158
158
|
self._start_date = pendulum.parse(start_date)
|
|
159
159
|
self._end_date = end_date and pendulum.parse(end_date)
|
|
160
|
-
self.
|
|
160
|
+
self._lookback_window = lookback_window
|
|
161
161
|
self.stream_params = {"dataTypeName": self.data_field}
|
|
162
162
|
|
|
163
163
|
def path(self, **kwargs) -> str:
|
|
@@ -267,7 +267,7 @@ class IterableExportStream(IterableStream, CheckpointMixin, ABC):
|
|
|
267
267
|
"""Compute the effective end date for the sync window.
|
|
268
268
|
|
|
269
269
|
When no explicit end_date is configured (production usage), the end
|
|
270
|
-
of the sync window is ``now() -
|
|
270
|
+
of the sync window is ``now() - lookback_window``. The
|
|
271
271
|
buffer accounts for Iterable Export API eventual consistency —
|
|
272
272
|
recently created events may not yet be indexed by the export
|
|
273
273
|
pipeline. Without this buffer the cursor would advance past those
|
|
@@ -275,7 +275,7 @@ class IterableExportStream(IterableStream, CheckpointMixin, ABC):
|
|
|
275
275
|
"""
|
|
276
276
|
if self._end_date:
|
|
277
277
|
return self._end_date
|
|
278
|
-
return pendulum.now("UTC") - pendulum.Duration(minutes=self.
|
|
278
|
+
return pendulum.now("UTC") - pendulum.Duration(minutes=self._lookback_window)
|
|
279
279
|
|
|
280
280
|
def stream_slices(
|
|
281
281
|
self,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|