airbyte-source-iterable 0.5.1.dev202405192159__py3-none-any.whl → 0.5.3__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: airbyte-source-iterable
3
- Version: 0.5.1.dev202405192159
3
+ Version: 0.5.3
4
4
  Summary: Source implementation for Iterable.
5
5
  Home-page: https://airbyte.com
6
6
  License: MIT
@@ -12,7 +12,7 @@ Classifier: Programming Language :: Python :: 3
12
12
  Classifier: Programming Language :: Python :: 3.9
13
13
  Classifier: Programming Language :: Python :: 3.10
14
14
  Classifier: Programming Language :: Python :: 3.11
15
- Requires-Dist: airbyte-cdk (==0.90.0)
15
+ Requires-Dist: airbyte-cdk (==0.89.0)
16
16
  Requires-Dist: pendulum (==2.1.2)
17
17
  Requires-Dist: python-dateutil (==2.8.2)
18
18
  Requires-Dist: requests (==2.31.0)
@@ -53,7 +53,7 @@ See `sample_files/sample_config.json` for a sample config file.
53
53
  poetry run source-iterable spec
54
54
  poetry run source-iterable check --config secrets/config.json
55
55
  poetry run source-iterable discover --config secrets/config.json
56
- poetry run source-iterable read --config secrets/config.json --catalog sample_files/configured_catalog.json
56
+ poetry run source-iterable read --config secrets/config.json --catalog integration_tests/configured_catalog.json
57
57
  ```
58
58
 
59
59
  ### Running unit tests
@@ -1,6 +1,6 @@
1
1
  source_iterable/__init__.py,sha256=8WKQT800ggxG1vGPoA_ZHUkozwEM7qMhGMhzEPCdA4o,65
2
- source_iterable/components.py,sha256=dMNoGz58C49sWvvJXP57arccWa1z9BHyhMOj2_KDUTU,1374
3
- source_iterable/manifest.yaml,sha256=LzQOH3nELMn8MxkVcrNRWx9bXZbSBhiQj05fNl4ZY3M,13996
2
+ source_iterable/components.py,sha256=dHp23THc43TmogP_tCxcv12mAgZSRs5fKir2ckr4hHI,1374
3
+ source_iterable/manifest.yaml,sha256=uO7z-bIU6CtGms6IsLwjyZ-cb3tVY-vLUMLOZGkZDts,13996
4
4
  source_iterable/run.py,sha256=-Bvz772Z7iJWExDoJS7chxv725hG4e9e5Engrtp66iE,236
5
5
  source_iterable/schemas/campaigns.json,sha256=FONoPuz_4aRat8OZzhj7BcHFAqetpBYUDmOZfroCu7I,2494
6
6
  source_iterable/schemas/campaigns_metrics.json,sha256=Aa6pNdVxHOG-LSxlLzhxFY8uIdfrPBTgX9QyWrLJ4Fs,168
@@ -25,7 +25,7 @@ source_iterable/source.py,sha256=AhZQ4L54VTo6jf2QltvFCqDNgqaPSEKCfR0GInCLEEc,453
25
25
  source_iterable/spec.json,sha256=y5_YFTkPPtxjvzGtaZZql90Tc37fyZZpQKXFGPL_cYE,1009
26
26
  source_iterable/streams.py,sha256=ZEC8IqBrTeD2oYOvLL51E62iOsIOK3jiTN7pLI-CwRs,19468
27
27
  source_iterable/utils.py,sha256=2oM8AjBZXs9nTG_PhSWmxBWEmp-w-tWFaxQQvAfUuMM,649
28
- airbyte_source_iterable-0.5.1.dev202405192159.dist-info/METADATA,sha256=UMoxP9Llm5p41wFdEvMzilnLM2WsZNesIN5ImqYlwtk,5378
29
- airbyte_source_iterable-0.5.1.dev202405192159.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
30
- airbyte_source_iterable-0.5.1.dev202405192159.dist-info/entry_points.txt,sha256=pjzrNtsOX3jW37IK0U5pSmLiraiuLTPr5aB5-hBXpAo,59
31
- airbyte_source_iterable-0.5.1.dev202405192159.dist-info/RECORD,,
28
+ airbyte_source_iterable-0.5.3.dist-info/METADATA,sha256=ig_iFX0XX3YedSEKYdYBOZ2SEDw40WBE6chKhI_rWww,5367
29
+ airbyte_source_iterable-0.5.3.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
30
+ airbyte_source_iterable-0.5.3.dist-info/entry_points.txt,sha256=pjzrNtsOX3jW37IK0U5pSmLiraiuLTPr5aB5-hBXpAo,59
31
+ airbyte_source_iterable-0.5.3.dist-info/RECORD,,
@@ -7,7 +7,6 @@ from dataclasses import dataclass
7
7
  from io import StringIO
8
8
 
9
9
  import requests
10
- from typing import Iterable
11
10
  from airbyte_cdk.sources.declarative.extractors.dpath_extractor import DpathExtractor
12
11
  from airbyte_cdk.sources.declarative.types import Config, Record, StreamSlice, StreamState
13
12
 
@@ -15,26 +14,28 @@ from airbyte_cdk.sources.declarative.types import Config, Record, StreamSlice, S
15
14
  @dataclass
16
15
  class XJsonRecordExtractor(DpathExtractor):
17
16
  def extract_records(self, response: requests.Response) -> list[Record]:
18
- for record in response.iter_lines():
19
- yield json.loads(record)
17
+ return [json.loads(record) for record in response.iter_lines()]
20
18
 
21
19
 
22
20
  @dataclass
23
21
  class ListUsersRecordExtractor(DpathExtractor):
24
- def extract_records(self, response: requests.Response) -> Iterable[Record]:
25
- for record in response.iter_lines():
26
- yield {"email": record.decode()}
22
+ def extract_records(self, response: requests.Response) -> list[Record]:
23
+ return [{"email": record.decode()} for record in response.iter_lines()]
27
24
 
28
25
 
29
26
  @dataclass
30
27
  class EventsRecordExtractor(DpathExtractor):
31
28
  common_fields = ("itblInternal", "_type", "createdAt", "email")
32
29
 
33
- def extract_records(self, response: requests.Response) -> Iterable[Record]:
30
+ def extract_records(self, response: requests.Response) -> list[Record]:
34
31
  jsonl_records = StringIO(response.text)
32
+ records = []
35
33
  for record in jsonl_records:
36
34
  record_dict = json.loads(record)
37
35
  record_dict_common_fields = {}
38
36
  for field in self.common_fields:
39
37
  record_dict_common_fields[field] = record_dict.pop(field, None)
40
- yield {**record_dict_common_fields, "data": record_dict}
38
+
39
+ records.append({**record_dict_common_fields, "data": record_dict})
40
+
41
+ return records
@@ -290,7 +290,7 @@ streams:
290
290
  partition_router: []
291
291
  primary_key: []
292
292
  incremental_sync:
293
- step: P30D
293
+ step: P90D
294
294
  type: DatetimeBasedCursor
295
295
  cursor_field: profileUpdatedAt
296
296
  end_datetime: