airbyte-cdk 6.48.17.dev0__py3-none-any.whl → 6.49.0__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.
Files changed (24) hide show
  1. airbyte_cdk/cli/source_declarative_manifest/_run.py +69 -10
  2. airbyte_cdk/connector.py +3 -3
  3. airbyte_cdk/entrypoint.py +36 -0
  4. airbyte_cdk/sources/declarative/declarative_component_schema.yaml +274 -68
  5. airbyte_cdk/sources/declarative/extractors/__init__.py +0 -4
  6. airbyte_cdk/sources/declarative/manifest_declarative_source.py +3 -1
  7. airbyte_cdk/sources/declarative/models/declarative_component_schema.py +189 -44
  8. airbyte_cdk/sources/declarative/parsers/model_to_component_factory.py +155 -60
  9. airbyte_cdk/sources/declarative/resolvers/components_resolver.py +0 -2
  10. airbyte_cdk/sources/declarative/resolvers/config_components_resolver.py +14 -49
  11. airbyte_cdk/sources/declarative/schema/dynamic_schema_loader.py +4 -19
  12. airbyte_cdk/sources/declarative/spec/__init__.py +2 -2
  13. airbyte_cdk/sources/declarative/spec/spec.py +71 -2
  14. airbyte_cdk/sources/declarative/transformations/config_transformations/add_fields.py +10 -23
  15. airbyte_cdk/sources/declarative/transformations/config_transformations/remap_field.py +2 -3
  16. airbyte_cdk/sources/declarative/validators/dpath_validator.py +1 -1
  17. {airbyte_cdk-6.48.17.dev0.dist-info → airbyte_cdk-6.49.0.dist-info}/METADATA +1 -1
  18. {airbyte_cdk-6.48.17.dev0.dist-info → airbyte_cdk-6.49.0.dist-info}/RECORD +22 -24
  19. airbyte_cdk/sources/declarative/extractors/combined_extractor.py +0 -44
  20. airbyte_cdk/sources/declarative/extractors/key_value_extractor.py +0 -46
  21. {airbyte_cdk-6.48.17.dev0.dist-info → airbyte_cdk-6.49.0.dist-info}/LICENSE.txt +0 -0
  22. {airbyte_cdk-6.48.17.dev0.dist-info → airbyte_cdk-6.49.0.dist-info}/LICENSE_SHORT +0 -0
  23. {airbyte_cdk-6.48.17.dev0.dist-info → airbyte_cdk-6.49.0.dist-info}/WHEEL +0 -0
  24. {airbyte_cdk-6.48.17.dev0.dist-info → airbyte_cdk-6.49.0.dist-info}/entry_points.txt +0 -0
@@ -9,28 +9,13 @@ import dpath
9
9
 
10
10
  from airbyte_cdk.sources.declarative.interpolation.interpolated_boolean import InterpolatedBoolean
11
11
  from airbyte_cdk.sources.declarative.interpolation.interpolated_string import InterpolatedString
12
+ from airbyte_cdk.sources.declarative.transformations.add_fields import (
13
+ AddedFieldDefinition,
14
+ ParsedAddFieldDefinition,
15
+ )
12
16
  from airbyte_cdk.sources.declarative.transformations.config_transformations.config_transformation import (
13
17
  ConfigTransformation,
14
18
  )
15
- from airbyte_cdk.sources.types import FieldPointer
16
-
17
-
18
- @dataclass(frozen=True)
19
- class AddedFieldDefinition:
20
- """Defines the field to add on a config"""
21
-
22
- path: FieldPointer
23
- value: Union[InterpolatedString, str]
24
- value_type: Optional[Type[Any]] = None
25
-
26
-
27
- @dataclass(frozen=True)
28
- class ParsedAddFieldDefinition:
29
- """Defines the field to add on a config"""
30
-
31
- path: FieldPointer
32
- value: InterpolatedString
33
- value_type: Optional[Type[Any]] = None
34
19
 
35
20
 
36
21
  @dataclass
@@ -44,19 +29,19 @@ class ConfigAddFields(ConfigTransformation):
44
29
  Examples of instantiating this transformation via YAML:
45
30
  - type: ConfigAddFields
46
31
  fields:
47
- # hardcoded constant
32
+ ### hardcoded constant
48
33
  - path: ["path"]
49
34
  value: "static_value"
50
35
 
51
- # nested path
36
+ ### nested path
52
37
  - path: ["path", "to", "field"]
53
38
  value: "static"
54
39
 
55
- # from config
40
+ ### from config
56
41
  - path: ["derived_field"]
57
42
  value: "{{ config.original_field }}"
58
43
 
59
- # by supplying any valid Jinja template directive or expression
44
+ ### by supplying any valid Jinja template directive or expression
60
45
  - path: ["two_times_two"]
61
46
  value: "{{ 2 * 2 }}"
62
47
 
@@ -90,6 +75,7 @@ class ConfigAddFields(ConfigTransformation):
90
75
  add_field.path,
91
76
  InterpolatedString.create(add_field.value, parameters={}),
92
77
  value_type=add_field.value_type,
78
+ parameters={},
93
79
  )
94
80
  )
95
81
  else:
@@ -98,6 +84,7 @@ class ConfigAddFields(ConfigTransformation):
98
84
  add_field.path,
99
85
  add_field.value,
100
86
  value_type=add_field.value_type,
87
+ parameters={},
101
88
  )
102
89
  )
103
90
 
@@ -3,9 +3,8 @@
3
3
  #
4
4
 
5
5
  from dataclasses import dataclass, field
6
- from typing import Any, List, Mapping, MutableMapping, Union
6
+ from typing import Any, List, Mapping, MutableMapping
7
7
 
8
- from airbyte_cdk.sources.declarative.interpolation.interpolated_boolean import InterpolatedBoolean
9
8
  from airbyte_cdk.sources.declarative.interpolation.interpolated_mapping import InterpolatedMapping
10
9
  from airbyte_cdk.sources.declarative.interpolation.interpolated_string import InterpolatedString
11
10
  from airbyte_cdk.sources.declarative.transformations.config_transformations.config_transformation import (
@@ -20,7 +19,7 @@ class ConfigRemapField(ConfigTransformation):
20
19
  """
21
20
 
22
21
  map: Mapping[str, Any]
23
- field_path: List[Union[InterpolatedString, str]]
22
+ field_path: List[str]
24
23
  config: Mapping[str, Any] = field(default_factory=dict)
25
24
 
26
25
  def __post_init__(self) -> None:
@@ -19,7 +19,7 @@ class DpathValidator(Validator):
19
19
  and applies a validation strategy to it.
20
20
  """
21
21
 
22
- field_path: List[Union[InterpolatedString, str]]
22
+ field_path: List[str]
23
23
  strategy: ValidationStrategy
24
24
 
25
25
  def __post_init__(self) -> None:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: airbyte-cdk
3
- Version: 6.48.17.dev0
3
+ Version: 6.49.0
4
4
  Summary: A framework for writing Airbyte Connectors.
5
5
  Home-page: https://airbyte.com
6
6
  License: MIT
@@ -8,10 +8,10 @@ airbyte_cdk/cli/airbyte_cdk/_secrets.py,sha256=jLtpkhFJHavABN3UuqddeDRGS8v1iEj0e
8
8
  airbyte_cdk/cli/airbyte_cdk/_version.py,sha256=ohZNIktLFk91sdzqFW5idaNrZAPX2dIRnz---_fcKOE,352
9
9
  airbyte_cdk/cli/airbyte_cdk/exceptions.py,sha256=bsGmlWN6cXL2jCD1WYAZMqFmK1OLg2xLrcC_60KHSeA,803
10
10
  airbyte_cdk/cli/source_declarative_manifest/__init__.py,sha256=-0ST722Nj65bgRokzpzPkD1NBBW5CytEHFUe38cB86Q,91
11
- airbyte_cdk/cli/source_declarative_manifest/_run.py,sha256=9qtbjt-I_stGWzWX6yVUKO_eE-Ga7g-uTuibML9qLBs,8330
11
+ airbyte_cdk/cli/source_declarative_manifest/_run.py,sha256=3ZXAic1MJkDyjfOGvcmmkIDY5vAqsNPp8A7Z8xjzm-A,10829
12
12
  airbyte_cdk/cli/source_declarative_manifest/spec.json,sha256=Earc1L6ngcdIr514oFQlUoOxdF4RHqtUyStSIAquXdY,554
13
13
  airbyte_cdk/config_observation.py,sha256=7SSPxtN0nXPkm4euGNcTTr1iLbwUL01jy-24V1Hzde0,3986
14
- airbyte_cdk/connector.py,sha256=bO23kdGRkl8XKFytOgrrWFc_VagteTHVEF6IsbizVkM,4224
14
+ airbyte_cdk/connector.py,sha256=N6TUlrZOMjLAI85JrNAKkfyTqnO5xfBCw4oEfgjJd9o,4254
15
15
  airbyte_cdk/connector_builder/README.md,sha256=Hw3wvVewuHG9-QgsAq1jDiKuLlStDxKBz52ftyNRnBw,1665
16
16
  airbyte_cdk/connector_builder/__init__.py,sha256=4Hw-PX1-VgESLF16cDdvuYCzGJtHntThLF4qIiULWeo,61
17
17
  airbyte_cdk/connector_builder/connector_builder_handler.py,sha256=OFTzxyfAevI3Um8fXTOLTgoCc4Sx9NzF0boqYkAATfM,6590
@@ -33,7 +33,7 @@ airbyte_cdk/destinations/vector_db_based/indexer.py,sha256=beiSi2Uu67EoTr7yQSaCJ
33
33
  airbyte_cdk/destinations/vector_db_based/test_utils.py,sha256=MkqLiOJ5QyKbV4rNiJhe-BHM7FD-ADHQ4bQGf4c5lRY,1932
34
34
  airbyte_cdk/destinations/vector_db_based/utils.py,sha256=FOyEo8Lc-fY8UyhpCivhZtIqBRyxf3cUt6anmK03fUY,1127
35
35
  airbyte_cdk/destinations/vector_db_based/writer.py,sha256=nZ00xPiohElJmYktEZZIhr0m5EDETCHGhg0Lb2S7A20,5095
36
- airbyte_cdk/entrypoint.py,sha256=NRJv5BNZRSUEVTmNBa9N7ih6fW5sg4DwL0nkB9kI99Y,18570
36
+ airbyte_cdk/entrypoint.py,sha256=R2kAsAnCAI7eZCctQpMCImLhFFwo7PniJVA0e7RhJVI,19774
37
37
  airbyte_cdk/exception_handler.py,sha256=D_doVl3Dt60ASXlJsfviOCswxGyKF2q0RL6rif3fNks,2013
38
38
  airbyte_cdk/logger.py,sha256=1cURbvawbunCAV178q-XhTHcbAQZTSf07WhU7U9AXWU,3744
39
39
  airbyte_cdk/manifest_migrations/README.md,sha256=PvnbrW1gyzhlkeucd0YAOXcXVxi0xBUUynzs4DMqjDo,2942
@@ -89,7 +89,7 @@ airbyte_cdk/sources/declarative/concurrent_declarative_source.py,sha256=GoZJ8Oxb
89
89
  airbyte_cdk/sources/declarative/datetime/__init__.py,sha256=4Hw-PX1-VgESLF16cDdvuYCzGJtHntThLF4qIiULWeo,61
90
90
  airbyte_cdk/sources/declarative/datetime/datetime_parser.py,sha256=_zGNGq31RNy_0QBLt_EcTvgPyhj7urPdx6oA3M5-r3o,3150
91
91
  airbyte_cdk/sources/declarative/datetime/min_max_datetime.py,sha256=0BHBtDNQZfvwM45-tY5pNlTcKAFSGGNxemoi0Jic-0E,5785
92
- airbyte_cdk/sources/declarative/declarative_component_schema.yaml,sha256=o3t_npbhuPBKJ4PCTYz0zh3XT6AtpDMhe8TMujPYCUs,169241
92
+ airbyte_cdk/sources/declarative/declarative_component_schema.yaml,sha256=ptEGR_DdB0DXZlFHxcXcW1jwBLu_wonoeJsXSw1Bgnw,176338
93
93
  airbyte_cdk/sources/declarative/declarative_source.py,sha256=qmyMnnet92eGc3C22yBtpvD5UZjqdhsAafP_zxI5wp8,1814
94
94
  airbyte_cdk/sources/declarative/declarative_stream.py,sha256=dCRlddBUSaJmBNBz1pSO1r2rTw8AP5d2_vlmIeGs2gg,10767
95
95
  airbyte_cdk/sources/declarative/decoders/__init__.py,sha256=JHb_0d3SE6kNY10mxA5YBEKPeSbsWYjByq1gUQxepoE,953
@@ -102,11 +102,9 @@ airbyte_cdk/sources/declarative/decoders/pagination_decoder_decorator.py,sha256=
102
102
  airbyte_cdk/sources/declarative/decoders/xml_decoder.py,sha256=EU-7t-5vIGRHZ14h-f0GUE4V5-eTM9Flux-A8xgI1Rc,3117
103
103
  airbyte_cdk/sources/declarative/decoders/zipfile_decoder.py,sha256=Din18m61aly2oG6TaXGpLcbfUHVOzjGzuMYkyxfHXT4,2290
104
104
  airbyte_cdk/sources/declarative/exceptions.py,sha256=kTPUA4I2NV4J6HDz-mKPGMrfuc592akJnOyYx38l_QM,176
105
- airbyte_cdk/sources/declarative/extractors/__init__.py,sha256=3Cu6FduH2FmWigvMAMd03o_ZfOSoUFLSb3BBfoc1xW4,989
106
- airbyte_cdk/sources/declarative/extractors/combined_extractor.py,sha256=_yM2eywOYYXDkONPssGU6JkEJlc81-cfamiEw7t_suk,1603
105
+ airbyte_cdk/sources/declarative/extractors/__init__.py,sha256=RmV-IkO1YLj0PSOrrqC9AV1gO8-90t8UTDVfJGshN9E,754
107
106
  airbyte_cdk/sources/declarative/extractors/dpath_extractor.py,sha256=wR4Ol4MG2lt5UlqXF5EU_k7qa5cN4_-luu3PJ1PlO3A,3131
108
107
  airbyte_cdk/sources/declarative/extractors/http_selector.py,sha256=2zWZ4ewTqQC8VwkjS0xD_u350Km3SiYP7hpOOgiLg5o,1169
109
- airbyte_cdk/sources/declarative/extractors/key_value_extractor.py,sha256=wmAr5RqOQXHsqhHDOwAIhPZZSRYm_NnPn3xTxl3oHyM,1641
110
108
  airbyte_cdk/sources/declarative/extractors/record_extractor.py,sha256=XJELMjahAsaomlvQgN2zrNO0DJX0G0fr9r682gUz7Pg,691
111
109
  airbyte_cdk/sources/declarative/extractors/record_filter.py,sha256=yTdEkyDUSW2KbFkEwJJMlS963C955LgCCOVfTmmScpQ,3367
112
110
  airbyte_cdk/sources/declarative/extractors/record_selector.py,sha256=vCpwX1PVRFPYKMzm0DHHP3YEZ0Gmd3bBzggOsRha038,7192
@@ -129,20 +127,20 @@ airbyte_cdk/sources/declarative/interpolation/interpolated_string.py,sha256=CQkH
129
127
  airbyte_cdk/sources/declarative/interpolation/interpolation.py,sha256=9IoeuWam3L6GyN10L6U8xNWXmkt9cnahSDNkez1OmFY,982
130
128
  airbyte_cdk/sources/declarative/interpolation/jinja.py,sha256=UQeuS4Vpyp4hlOn-R3tRyeBX0e9IoV6jQ6gH-Jz8lY0,7182
131
129
  airbyte_cdk/sources/declarative/interpolation/macros.py,sha256=UYSJ5gW7TkHALYnNvUnRP3RlyGwGuRMObF3BHuNzjJM,5320
132
- airbyte_cdk/sources/declarative/manifest_declarative_source.py,sha256=88uuVKamdAFzsC3JBKvajI8icZj00BmRLFQe9bFskrk,23132
130
+ airbyte_cdk/sources/declarative/manifest_declarative_source.py,sha256=cZNUOeIogrCmCS7RXeJqQIlnsANigz1cngpLko02M2g,23191
133
131
  airbyte_cdk/sources/declarative/migrations/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
134
132
  airbyte_cdk/sources/declarative/migrations/legacy_to_per_partition_state_migration.py,sha256=V2lpYE9LJKvz6BUViHk4vaRGndxNABmPbDCtyYdkqaE,4013
135
133
  airbyte_cdk/sources/declarative/migrations/state_migration.py,sha256=KWPjealMLKSMtajXgkdGgKg7EmTLR-CqqD7UIh0-eDU,794
136
134
  airbyte_cdk/sources/declarative/models/__init__.py,sha256=nUFxNCiKeYRVXuZEKA7GD-lTHxsiKcQ8FitZjKhPIvE,100
137
135
  airbyte_cdk/sources/declarative/models/base_model_with_deprecations.py,sha256=Imnj3yef0aqRdLfaUxkIYISUb8YkiPrRH_wBd-x8HjM,5999
138
- airbyte_cdk/sources/declarative/models/declarative_component_schema.py,sha256=8La2uX0ODkXwBW1PXkHpg-EkSwttf_nDSXYq9BiPKVo,119463
136
+ airbyte_cdk/sources/declarative/models/declarative_component_schema.py,sha256=NLMi8gVD1DK_jl_9LwSu-RMaxn410XC_GlbEgKGh6js,124938
139
137
  airbyte_cdk/sources/declarative/parsers/__init__.py,sha256=ZnqYNxHsKCgO38IwB34RQyRMXTs4GTvlRi3ImKnIioo,61
140
138
  airbyte_cdk/sources/declarative/parsers/custom_code_compiler.py,sha256=nlVvHC511NUyDEEIRBkoeDTAvLqKNp-hRy8D19z8tdk,5941
141
139
  airbyte_cdk/sources/declarative/parsers/custom_exceptions.py,sha256=wnRUP0Xeru9Rbu5OexXSDN9QWDo8YU4tT9M2LDVOgGA,802
142
140
  airbyte_cdk/sources/declarative/parsers/manifest_component_transformer.py,sha256=2UdpCz3yi7ISZTyqkQXSSy3dMxeyOWqV7OlAS5b9GVg,11568
143
141
  airbyte_cdk/sources/declarative/parsers/manifest_normalizer.py,sha256=laBy7ebjA-PiNwc-50U4FHvMqS_mmHvnabxgFs4CjGw,17069
144
142
  airbyte_cdk/sources/declarative/parsers/manifest_reference_resolver.py,sha256=pJmg78vqE5VfUrF_KJnWjucQ4k9IWFULeAxHCowrHXE,6806
145
- airbyte_cdk/sources/declarative/parsers/model_to_component_factory.py,sha256=ZUEh2-mIuhLBjZrECyZB54K-S402sjHDXIUcJ1Cwy18,170489
143
+ airbyte_cdk/sources/declarative/parsers/model_to_component_factory.py,sha256=60w0FR8iU4O4J-HdE7bMRYD7TXuCO4MgXLah1_4GX2Q,174107
146
144
  airbyte_cdk/sources/declarative/partition_routers/__init__.py,sha256=TBC9AkGaUqHm2IKHMPN6punBIcY5tWGULowcLoAVkfw,1109
147
145
  airbyte_cdk/sources/declarative/partition_routers/async_job_partition_router.py,sha256=VelO7zKqKtzMJ35jyFeg0ypJLQC0plqqIBNXoBW1G2E,3001
148
146
  airbyte_cdk/sources/declarative/partition_routers/cartesian_product_stream_slicer.py,sha256=c5cuVFM6NFkuQqG8Z5IwkBuwDrvXZN1CunUOM_L0ezg,6892
@@ -196,8 +194,8 @@ airbyte_cdk/sources/declarative/requesters/request_options/request_options_provi
196
194
  airbyte_cdk/sources/declarative/requesters/request_path.py,sha256=S3MeFvcaQrMbOkSY2W2VbXLNomqt_3eXqVd9ZhgNwUs,299
197
195
  airbyte_cdk/sources/declarative/requesters/requester.py,sha256=T6tMx_Bx4iT-0YVjY7IzgRil-gaIu9n01b1iwpTh3Ek,5516
198
196
  airbyte_cdk/sources/declarative/resolvers/__init__.py,sha256=NiDcz5qi8HPsfX94MUmnX0Rgs_kQXGvucOmJjNWlxKQ,1207
199
- airbyte_cdk/sources/declarative/resolvers/components_resolver.py,sha256=oJIpy66ep8n-QOc8GwpllApTRcl4QtQhkTw5fWWra2w,2026
200
- airbyte_cdk/sources/declarative/resolvers/config_components_resolver.py,sha256=1coEpB_mRAV1NgoaWd4CMllf4SPOFQGi3ac3DTP71ZQ,6791
197
+ airbyte_cdk/sources/declarative/resolvers/components_resolver.py,sha256=KPjKc0yb9artL4ZkeqN8RmEykHH6FJgqXD7fCEnh1X0,1936
198
+ airbyte_cdk/sources/declarative/resolvers/config_components_resolver.py,sha256=dz4iJV9liD_LzY_Mn4XmAStoUll60R3MIGWV4aN3pgg,5223
201
199
  airbyte_cdk/sources/declarative/resolvers/http_components_resolver.py,sha256=AiojNs8wItJFrENZBFUaDvau3sgwudO6Wkra36upSPo,4639
202
200
  airbyte_cdk/sources/declarative/retrievers/__init__.py,sha256=nQepwG_RfW53sgwvK5dLPqfCx0VjsQ83nYoPjBMAaLM,527
203
201
  airbyte_cdk/sources/declarative/retrievers/async_retriever.py,sha256=6oZtnCHm9NdDvjTSrVwPQOXGSdETSIR7eWH2vFjM7jI,4855
@@ -213,21 +211,21 @@ airbyte_cdk/sources/declarative/retrievers/simple_retriever.py,sha256=Ui7V_etQ-s
213
211
  airbyte_cdk/sources/declarative/schema/__init__.py,sha256=xU45UvM5O4c1PSM13UHpCdh5hpW3HXy9vRRGEiAC1rg,795
214
212
  airbyte_cdk/sources/declarative/schema/composite_schema_loader.py,sha256=ymGbvxS_QyGc4nnjEyRo5ch8bVedELO41PAUxKXZyMw,1113
215
213
  airbyte_cdk/sources/declarative/schema/default_schema_loader.py,sha256=UnbzlExmwoQiVV8zDg4lhAEaqA_0pRfwbMRe8yqOuWk,1834
216
- airbyte_cdk/sources/declarative/schema/dynamic_schema_loader.py,sha256=q_AUnbzm6AoZd31NhlU4ucTkwRwEqE5VvVeXqKLYfrM,11186
214
+ airbyte_cdk/sources/declarative/schema/dynamic_schema_loader.py,sha256=J8Q_iJYhcSQLWyt0bTZCbDAGpxt9G8FCc6Q9jtGsNzw,10703
217
215
  airbyte_cdk/sources/declarative/schema/inline_schema_loader.py,sha256=bVETE10hRsatRJq3R3BeyRR0wIoK3gcP1gcpVRQ_P5U,464
218
216
  airbyte_cdk/sources/declarative/schema/json_file_schema_loader.py,sha256=5Wl-fqW-pVf_dxJ4yGHMAFfC4JjKHYJhqFJT1xA57F4,4177
219
217
  airbyte_cdk/sources/declarative/schema/schema_loader.py,sha256=kjt8v0N5wWKA5zyLnrDLxf1PJKdUqvQq2RVnAOAzNSY,379
220
- airbyte_cdk/sources/declarative/spec/__init__.py,sha256=H0UwoRhgucbKBIzg85AXrifybVmfpwWpPdy22vZKVuo,141
221
- airbyte_cdk/sources/declarative/spec/spec.py,sha256=ODSNUgkDOhnLQnwLjgSaME6R3kNeywjROvbNrWEnsgU,1876
218
+ airbyte_cdk/sources/declarative/spec/__init__.py,sha256=9FYO-fVOclrwjAW4qwRTbZRVopTc9rOaauAJfThdNCQ,177
219
+ airbyte_cdk/sources/declarative/spec/spec.py,sha256=eOdIh_Jzlq0Tbmgrx4TSR-6kBxl7nu9F-I-zHBcS0JI,4734
222
220
  airbyte_cdk/sources/declarative/stream_slicers/__init__.py,sha256=sI9vhc95RwJYOnA0VKjcbtKgFcmAbWjhdWBXFbAijOs,176
223
221
  airbyte_cdk/sources/declarative/stream_slicers/declarative_partition_generator.py,sha256=cjKGm4r438dd1GxrFHJ4aYrdzG2bkncnwaWxAwlXR3M,3585
224
222
  airbyte_cdk/sources/declarative/stream_slicers/stream_slicer.py,sha256=SOkIPBi2Wu7yxIvA15yFzUAB95a3IzA8LPq5DEqHQQc,725
225
223
  airbyte_cdk/sources/declarative/transformations/__init__.py,sha256=CPJ8TlMpiUmvG3624VYu_NfTzxwKcfBjM2Q2wJ7fkSA,919
226
224
  airbyte_cdk/sources/declarative/transformations/add_fields.py,sha256=Eg1jQtRObgzxbtySTQs5uEZIjEklsoHFxYSPf78x6Ng,5420
227
225
  airbyte_cdk/sources/declarative/transformations/config_transformations/__init__.py,sha256=GaU3ezFa5opeDgdlNohX6TXsWJlOD2jOfJXQWeQCh7E,263
228
- airbyte_cdk/sources/declarative/transformations/config_transformations/add_fields.py,sha256=SwZ32to9j6kJZXjWVDU2vxQ4UklwbekfOL7O_oTDtMU,4144
226
+ airbyte_cdk/sources/declarative/transformations/config_transformations/add_fields.py,sha256=pP9Er3CI0xbHhQDIDsDSg9TwhuL14wamcMXUY5pdc9g,3902
229
227
  airbyte_cdk/sources/declarative/transformations/config_transformations/config_transformation.py,sha256=vh-NAe6-1H77tYP6MrH4qz_fxCDgoYoi1YlbT1yScrA,629
230
- airbyte_cdk/sources/declarative/transformations/config_transformations/remap_field.py,sha256=k2FLHaOVlUDYfns5pPp2hIG6cP8hLRozpHg_fTrSYI0,2493
228
+ airbyte_cdk/sources/declarative/transformations/config_transformations/remap_field.py,sha256=5UG48Uvqo5_H0-dZJEMu7ONwrHyeDkJ6TToPz9OE4vU,2360
231
229
  airbyte_cdk/sources/declarative/transformations/config_transformations/remove_fields.py,sha256=mIoGM4fywxdlhdNAWHRfQbzOcP7rCdGEn7Yu8jDN1dY,2316
232
230
  airbyte_cdk/sources/declarative/transformations/dpath_flatten_fields.py,sha256=DO_zR2TqlvLTRO0c572xrleI4V-1QWVOEhbenGXVMLc,3811
233
231
  airbyte_cdk/sources/declarative/transformations/flatten_fields.py,sha256=yT3owG6rMKaRX-LJ_T-jSTnh1B5NoAHyH4YZN9yOvE8,1758
@@ -238,7 +236,7 @@ airbyte_cdk/sources/declarative/transformations/remove_fields.py,sha256=EwUP0SZ2
238
236
  airbyte_cdk/sources/declarative/transformations/transformation.py,sha256=4sXtx9cNY2EHUPq-xHvDs8GQEBUy3Eo6TkRLKHPXx68,1161
239
237
  airbyte_cdk/sources/declarative/types.py,sha256=yqx0xlZv_76tkC7fqJKefmvl4GJJ8mXbeddwVV8XRJU,778
240
238
  airbyte_cdk/sources/declarative/validators/__init__.py,sha256=_xccLn4QKQqR3CAwmCVOA7l6QuJd_Isoh6NsR8crM2U,663
241
- airbyte_cdk/sources/declarative/validators/dpath_validator.py,sha256=DzyHYVOm94yvqB5if2JbFbP0SNGn3QI45DR6biU1zrY,2126
239
+ airbyte_cdk/sources/declarative/validators/dpath_validator.py,sha256=BF1KR20RWew_wPV3rDmXPOGO8QWZLZu7u5ubbNO1Hgo,2099
242
240
  airbyte_cdk/sources/declarative/validators/predicate_validator.py,sha256=Q4eVnclk1vYPvVF7XROG4MFEVkPYbYKEF8SUKs7P7-k,582
243
241
  airbyte_cdk/sources/declarative/validators/validate_adheres_to_schema.py,sha256=kjcuKxWMJEzpF4GiESITGMxBAXw6YZCAsgOQMgeBo4g,1085
244
242
  airbyte_cdk/sources/declarative/validators/validation_strategy.py,sha256=LwqUX89cFdHTM1-h6c8vebBA9WC38HYoGBvJfCZHr0g,467
@@ -421,9 +419,9 @@ airbyte_cdk/utils/slice_hasher.py,sha256=EDxgROHDbfG-QKQb59m7h_7crN1tRiawdf5uU7G
421
419
  airbyte_cdk/utils/spec_schema_transformations.py,sha256=-5HTuNsnDBAhj-oLeQXwpTGA0HdcjFOf2zTEMUTTg_Y,816
422
420
  airbyte_cdk/utils/stream_status_utils.py,sha256=ZmBoiy5HVbUEHAMrUONxZvxnvfV9CesmQJLDTAIWnWw,1171
423
421
  airbyte_cdk/utils/traced_exception.py,sha256=C8uIBuCL_E4WnBAOPSxBicD06JAldoN9fGsQDp463OY,6292
424
- airbyte_cdk-6.48.17.dev0.dist-info/LICENSE.txt,sha256=Wfe61S4BaGPj404v8lrAbvhjYR68SHlkzeYrg3_bbuM,1051
425
- airbyte_cdk-6.48.17.dev0.dist-info/LICENSE_SHORT,sha256=aqF6D1NcESmpn-cqsxBtszTEnHKnlsp8L4x9wAh3Nxg,55
426
- airbyte_cdk-6.48.17.dev0.dist-info/METADATA,sha256=rybxpJSXyko7F2tXrJGvD79wVY9N0ie5ibd0CXaNE8w,6349
427
- airbyte_cdk-6.48.17.dev0.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
428
- airbyte_cdk-6.48.17.dev0.dist-info/entry_points.txt,sha256=AKWbEkHfpzzk9nF9tqBUaw1MbvTM4mGtEzmZQm0ZWvM,139
429
- airbyte_cdk-6.48.17.dev0.dist-info/RECORD,,
422
+ airbyte_cdk-6.49.0.dist-info/LICENSE.txt,sha256=Wfe61S4BaGPj404v8lrAbvhjYR68SHlkzeYrg3_bbuM,1051
423
+ airbyte_cdk-6.49.0.dist-info/LICENSE_SHORT,sha256=aqF6D1NcESmpn-cqsxBtszTEnHKnlsp8L4x9wAh3Nxg,55
424
+ airbyte_cdk-6.49.0.dist-info/METADATA,sha256=2RMSDX4QS6JgauUNK2qFlrr47cmgxL93Dm1sOnhT4bc,6343
425
+ airbyte_cdk-6.49.0.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
426
+ airbyte_cdk-6.49.0.dist-info/entry_points.txt,sha256=AKWbEkHfpzzk9nF9tqBUaw1MbvTM4mGtEzmZQm0ZWvM,139
427
+ airbyte_cdk-6.49.0.dist-info/RECORD,,
@@ -1,44 +0,0 @@
1
- #
2
- # Copyright (c) 2023 Airbyte, Inc., all rights reserved.
3
- #
4
-
5
- from dataclasses import InitVar, dataclass, field
6
- from itertools import islice
7
- from typing import Any, Iterable, List, Mapping, MutableMapping, Union
8
-
9
- import dpath
10
- import requests
11
-
12
- from airbyte_cdk.sources.declarative.decoders import Decoder, JsonDecoder
13
- from airbyte_cdk.sources.declarative.extractors.record_extractor import RecordExtractor
14
- from airbyte_cdk.sources.declarative.interpolation.interpolated_string import InterpolatedString
15
- from airbyte_cdk.sources.types import Config
16
-
17
-
18
- @dataclass
19
- class CombinedExtractor(RecordExtractor):
20
- """
21
- Extractor that combines keys and values from two separate extractors.
22
-
23
- The `keys_extractor` and `values_extractor` extract records independently
24
- from the response. Their outputs are zipped together to form key-value mappings.
25
-
26
- Each key from `keys_extractor` should correspond to a key in the resulting dictionary,
27
- and each value from `values_extractor` is the value for that key.
28
-
29
- Example:
30
- keys_extractor -> yields: ["name", "age"]
31
- values_extractor -> yields: ["Alice", 30]
32
- result: { "name": "Alice", "age": 30 }
33
- """
34
-
35
- extractors: List[RecordExtractor]
36
-
37
- def extract_records(self, response: requests.Response) -> Iterable[MutableMapping[Any, Any]]:
38
- extractors_records = [extractor.extract_records(response) for extractor in self.extractors]
39
-
40
- for records in zip(*extractors_records):
41
- merged = {}
42
- for record in records:
43
- merged.update(record) # merge all fields
44
- yield merged
@@ -1,46 +0,0 @@
1
- #
2
- # Copyright (c) 2023 Airbyte, Inc., all rights reserved.
3
- #
4
-
5
- from dataclasses import InitVar, dataclass, field
6
- from itertools import islice
7
- from typing import Any, Iterable, List, Mapping, MutableMapping, Union
8
-
9
- import dpath
10
- import requests
11
-
12
- from airbyte_cdk.sources.declarative.decoders import Decoder, JsonDecoder
13
- from airbyte_cdk.sources.declarative.extractors.record_extractor import RecordExtractor
14
- from airbyte_cdk.sources.declarative.interpolation.interpolated_string import InterpolatedString
15
- from airbyte_cdk.sources.types import Config
16
-
17
-
18
- @dataclass
19
- class KeyValueExtractor(RecordExtractor):
20
- """
21
- Extractor that combines keys and values from two separate extractors.
22
-
23
- The `keys_extractor` and `values_extractor` extract records independently
24
- from the response. Their outputs are zipped together to form key-value mappings.
25
-
26
- Each key from `keys_extractor` should correspond to a key in the resulting dictionary,
27
- and each value from `values_extractor` is the value for that key.
28
-
29
- Example:
30
- keys_extractor -> yields: ["name", "age"]
31
- values_extractor -> yields: ["Alice", 30]
32
- result: { "name": "Alice", "age": 30 }
33
- """
34
-
35
- keys_extractor: RecordExtractor
36
- values_extractor: RecordExtractor
37
-
38
- def extract_records(self, response: requests.Response) -> Iterable[MutableMapping[Any, Any]]:
39
- keys = list(self.keys_extractor.extract_records(response))
40
- values = self.values_extractor.extract_records(response)
41
-
42
- while True:
43
- chunk = list(islice(values, len(keys)))
44
- if not chunk:
45
- break
46
- yield dict(zip(keys, chunk))