airbyte-cdk 6.26.0.dev4103__py3-none-any.whl → 6.26.0.dev4105__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_cdk/sources/file_based/config/abstract_file_based_spec.py +2 -7
- airbyte_cdk/sources/file_based/file_based_source.py +5 -26
- airbyte_cdk/sources/file_based/stream/identities_stream.py +3 -6
- {airbyte_cdk-6.26.0.dev4103.dist-info → airbyte_cdk-6.26.0.dev4105.dist-info}/METADATA +1 -1
- {airbyte_cdk-6.26.0.dev4103.dist-info → airbyte_cdk-6.26.0.dev4105.dist-info}/RECORD +8 -9
- airbyte_cdk/sources/file_based/config/identities_based_stream_config.py +0 -8
- {airbyte_cdk-6.26.0.dev4103.dist-info → airbyte_cdk-6.26.0.dev4105.dist-info}/LICENSE.txt +0 -0
- {airbyte_cdk-6.26.0.dev4103.dist-info → airbyte_cdk-6.26.0.dev4105.dist-info}/WHEEL +0 -0
- {airbyte_cdk-6.26.0.dev4103.dist-info → airbyte_cdk-6.26.0.dev4105.dist-info}/entry_points.txt +0 -0
@@ -11,9 +11,6 @@ from pydantic.v1 import AnyUrl, BaseModel, Field
|
|
11
11
|
|
12
12
|
from airbyte_cdk import OneOfOptionConfig
|
13
13
|
from airbyte_cdk.sources.file_based.config.file_based_stream_config import FileBasedStreamConfig
|
14
|
-
from airbyte_cdk.sources.file_based.config.identities_based_stream_config import (
|
15
|
-
IdentitiesStreamConfig,
|
16
|
-
)
|
17
14
|
from airbyte_cdk.sources.utils import schema_helpers
|
18
15
|
|
19
16
|
|
@@ -31,10 +28,8 @@ class DeliverRecords(BaseModel):
|
|
31
28
|
default=False,
|
32
29
|
airbyte_hidden=True,
|
33
30
|
)
|
34
|
-
|
35
|
-
title="
|
36
|
-
description="Configuration for identities",
|
37
|
-
airbyte_hidden=True,
|
31
|
+
domain: Optional[str] = Field(
|
32
|
+
title="Domain", description="The domain of the identities.", airbyte_hidden=True
|
38
33
|
)
|
39
34
|
|
40
35
|
|
@@ -33,9 +33,6 @@ from airbyte_cdk.sources.file_based.config.file_based_stream_config import (
|
|
33
33
|
FileBasedStreamConfig,
|
34
34
|
ValidationPolicy,
|
35
35
|
)
|
36
|
-
from airbyte_cdk.sources.file_based.config.identities_based_stream_config import (
|
37
|
-
IdentitiesStreamConfig,
|
38
|
-
)
|
39
36
|
from airbyte_cdk.sources.file_based.discovery_policy import (
|
40
37
|
AbstractDiscoveryPolicy,
|
41
38
|
DefaultDiscoveryPolicy,
|
@@ -64,6 +61,7 @@ from airbyte_cdk.sources.file_based.stream.concurrent.cursor import (
|
|
64
61
|
FileBasedFinalStateCursor,
|
65
62
|
)
|
66
63
|
from airbyte_cdk.sources.file_based.stream.cursor import AbstractFileBasedCursor
|
64
|
+
from airbyte_cdk.sources.file_based.stream.identities_stream import IDENTITIES_STREAM_NAME
|
67
65
|
from airbyte_cdk.sources.message.repository import InMemoryMessageRepository, MessageRepository
|
68
66
|
from airbyte_cdk.sources.streams import Stream
|
69
67
|
from airbyte_cdk.sources.streams.concurrent.cursor import CursorField
|
@@ -73,6 +71,7 @@ from airbyte_cdk.utils.traced_exception import AirbyteTracedException
|
|
73
71
|
DEFAULT_CONCURRENCY = 100
|
74
72
|
MAX_CONCURRENCY = 100
|
75
73
|
INITIAL_N_PARTITIONS = MAX_CONCURRENCY // 2
|
74
|
+
IDENTITIES_STREAM = "identities"
|
76
75
|
|
77
76
|
|
78
77
|
class FileBasedSource(ConcurrentSourceAdapter, ABC):
|
@@ -301,11 +300,8 @@ class FileBasedSource(ConcurrentSourceAdapter, ABC):
|
|
301
300
|
|
302
301
|
streams.append(stream)
|
303
302
|
|
304
|
-
|
305
|
-
|
306
|
-
identities_stream = self._make_identities_stream(
|
307
|
-
stream_config=identities_stream_config
|
308
|
-
)
|
303
|
+
if self._sync_acl_permissions(parsed_config):
|
304
|
+
identities_stream = self._make_identities_stream()
|
309
305
|
streams.append(identities_stream)
|
310
306
|
return streams
|
311
307
|
|
@@ -335,11 +331,9 @@ class FileBasedSource(ConcurrentSourceAdapter, ABC):
|
|
335
331
|
|
336
332
|
def _make_identities_stream(
|
337
333
|
self,
|
338
|
-
stream_config: IdentitiesStreamConfig,
|
339
334
|
) -> Stream:
|
340
335
|
return IdentitiesStream(
|
341
|
-
|
342
|
-
catalog_schema=self.stream_schemas.get(stream_config.name),
|
336
|
+
catalog_schema=self.stream_schemas.get(IDENTITIES_STREAM_NAME),
|
343
337
|
stream_reader=self.stream_reader,
|
344
338
|
discovery_policy=self.discovery_policy,
|
345
339
|
errors_collector=self.errors_collector,
|
@@ -457,18 +451,3 @@ class FileBasedSource(ConcurrentSourceAdapter, ABC):
|
|
457
451
|
):
|
458
452
|
return parsed_config.delivery_method.sync_acl_permissions
|
459
453
|
return False
|
460
|
-
|
461
|
-
@staticmethod
|
462
|
-
def _get_identities_stream_config(
|
463
|
-
parsed_config: AbstractFileBasedSpec,
|
464
|
-
) -> Optional[IdentitiesStreamConfig]:
|
465
|
-
identities_stream_config = None
|
466
|
-
if (
|
467
|
-
FileBasedSource._sync_acl_permissions(parsed_config)
|
468
|
-
and hasattr(parsed_config.delivery_method, "identities")
|
469
|
-
and parsed_config.delivery_method.identities is not None
|
470
|
-
and isinstance(parsed_config.delivery_method.identities, IdentitiesStreamConfig)
|
471
|
-
and parsed_config.delivery_method.identities.domain
|
472
|
-
):
|
473
|
-
identities_stream_config = parsed_config.delivery_method.identities
|
474
|
-
return identities_stream_config
|
@@ -11,9 +11,6 @@ from airbyte_protocol_dataclasses.models import SyncMode
|
|
11
11
|
from airbyte_cdk.models import AirbyteLogMessage, AirbyteMessage, Level
|
12
12
|
from airbyte_cdk.models import Type as MessageType
|
13
13
|
from airbyte_cdk.sources.file_based.config.file_based_stream_config import PrimaryKeyType
|
14
|
-
from airbyte_cdk.sources.file_based.config.identities_based_stream_config import (
|
15
|
-
IdentitiesStreamConfig,
|
16
|
-
)
|
17
14
|
from airbyte_cdk.sources.file_based.discovery_policy import AbstractDiscoveryPolicy
|
18
15
|
from airbyte_cdk.sources.file_based.exceptions import FileBasedErrorsCollector, FileBasedSourceError
|
19
16
|
from airbyte_cdk.sources.file_based.file_based_stream_reader import AbstractFileBasedStreamReader
|
@@ -25,6 +22,8 @@ from airbyte_cdk.sources.streams.core import JsonSchema
|
|
25
22
|
from airbyte_cdk.sources.utils.record_helper import stream_data_to_airbyte_message
|
26
23
|
from airbyte_cdk.utils.traced_exception import AirbyteTracedException
|
27
24
|
|
25
|
+
IDENTITIES_STREAM_NAME = "identities"
|
26
|
+
|
28
27
|
|
29
28
|
class IdentitiesStream(Stream):
|
30
29
|
"""
|
@@ -36,14 +35,12 @@ class IdentitiesStream(Stream):
|
|
36
35
|
|
37
36
|
def __init__(
|
38
37
|
self,
|
39
|
-
config: IdentitiesStreamConfig,
|
40
38
|
catalog_schema: Optional[Mapping[str, Any]],
|
41
39
|
stream_reader: AbstractFileBasedStreamReader,
|
42
40
|
discovery_policy: AbstractDiscoveryPolicy,
|
43
41
|
errors_collector: FileBasedErrorsCollector,
|
44
42
|
):
|
45
43
|
super().__init__()
|
46
|
-
self.config = config
|
47
44
|
self.catalog_schema = catalog_schema
|
48
45
|
self.stream_reader = stream_reader
|
49
46
|
self._discovery_policy = discovery_policy
|
@@ -93,7 +90,7 @@ class IdentitiesStream(Stream):
|
|
93
90
|
|
94
91
|
@property
|
95
92
|
def name(self) -> str:
|
96
|
-
return
|
93
|
+
return IDENTITIES_STREAM_NAME
|
97
94
|
|
98
95
|
def get_cursor(self) -> Optional[Cursor]:
|
99
96
|
return None
|
@@ -201,12 +201,11 @@ airbyte_cdk/sources/file_based/availability_strategy/__init__.py,sha256=ddKQfUmk
|
|
201
201
|
airbyte_cdk/sources/file_based/availability_strategy/abstract_file_based_availability_strategy.py,sha256=01Nd4b7ERAbp-OZo_8rrAzFXWPTMwr02SnWiN17nx8Q,2363
|
202
202
|
airbyte_cdk/sources/file_based/availability_strategy/default_file_based_availability_strategy.py,sha256=j9T5TimfWFUz7nqsaj-83G3xWmDpsmeSbDnaUNmz0UM,5849
|
203
203
|
airbyte_cdk/sources/file_based/config/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
204
|
-
airbyte_cdk/sources/file_based/config/abstract_file_based_spec.py,sha256=
|
204
|
+
airbyte_cdk/sources/file_based/config/abstract_file_based_spec.py,sha256=s8SKkU0xWcA44ZFGvmGCoBjhfwUewIM13voAKtm5494,7232
|
205
205
|
airbyte_cdk/sources/file_based/config/avro_format.py,sha256=NxTF96ewzn6HuhgodsY7Rpb-ybr1ZEWW5d4Vid64g5A,716
|
206
206
|
airbyte_cdk/sources/file_based/config/csv_format.py,sha256=NWekkyT8dTwiVK0mwa_krQD4FJPHSDfILo8kPAg3-Vs,8006
|
207
207
|
airbyte_cdk/sources/file_based/config/excel_format.py,sha256=9qAmTsT6SoVzNfNv0oBVkVCmiyqQuVAbfRKajjoa7Js,378
|
208
208
|
airbyte_cdk/sources/file_based/config/file_based_stream_config.py,sha256=rkTuHpz9G8o2YEnCkOZJM2vJZt_hEE4zklHivRfx43s,4647
|
209
|
-
airbyte_cdk/sources/file_based/config/identities_based_stream_config.py,sha256=VNlY8otsCLT8nvB6drT9CO1UqDGaRqP0VeQpdCJApw8,284
|
210
209
|
airbyte_cdk/sources/file_based/config/jsonl_format.py,sha256=cxtpz4t9_ERQyj_1Bx4DjOxuYLykWt0B02S4dWW5BgM,378
|
211
210
|
airbyte_cdk/sources/file_based/config/parquet_format.py,sha256=XOp-7nmm_WcbGI8SjKH2fs3Mkf1H4RAOYSWeUFYAz3w,741
|
212
211
|
airbyte_cdk/sources/file_based/config/permissions.py,sha256=CmXKilhNQOfm4NFlXVBFF2pz3hIUrt3JFp5bPVerE_8,781
|
@@ -215,7 +214,7 @@ airbyte_cdk/sources/file_based/discovery_policy/__init__.py,sha256=gl3ey6mZbyfra
|
|
215
214
|
airbyte_cdk/sources/file_based/discovery_policy/abstract_discovery_policy.py,sha256=dCfXX529Rd5rtopg4VeEgTPJjFtqjtjzPq6LCw18Wt0,605
|
216
215
|
airbyte_cdk/sources/file_based/discovery_policy/default_discovery_policy.py,sha256=-xujTidtrq6HC00WKbjQh1CZdT5LMuzkp5BLjqDmfTY,1007
|
217
216
|
airbyte_cdk/sources/file_based/exceptions.py,sha256=WP0qkG6fpWoBpOyyicgp5YNE393VWyegq5qSy0v4QtM,7362
|
218
|
-
airbyte_cdk/sources/file_based/file_based_source.py,sha256=
|
217
|
+
airbyte_cdk/sources/file_based/file_based_source.py,sha256=4zaMKFcNBvHKJsymSXhpBLE1uW9ea9lua8-EV_2_Yrg,19362
|
219
218
|
airbyte_cdk/sources/file_based/file_based_stream_reader.py,sha256=5xcCnTd_zaMVBL1Xp215JAiyNQBf4wAs_WwVgcLi2l4,8036
|
220
219
|
airbyte_cdk/sources/file_based/file_types/__init__.py,sha256=blCLn0-2LC-ZdgcNyDEhqM2RiUvEjEBh-G4-t32ZtuM,1268
|
221
220
|
airbyte_cdk/sources/file_based/file_types/avro_parser.py,sha256=XNx-JC-sgzH9u3nOJ2M59FxBXvtig8LN6BIkeDOavZA,10858
|
@@ -243,7 +242,7 @@ airbyte_cdk/sources/file_based/stream/cursor/__init__.py,sha256=MhFB5hOo8sjwvCh8
|
|
243
242
|
airbyte_cdk/sources/file_based/stream/cursor/abstract_file_based_cursor.py,sha256=om-x3gZFPgWDpi15S9RxZmR36VHnk8sytgN6LlBQhAw,1934
|
244
243
|
airbyte_cdk/sources/file_based/stream/cursor/default_file_based_cursor.py,sha256=VGV7xLyBribuBMVrXtO1xqkWJD86bl7yhXtjnwLMohM,7051
|
245
244
|
airbyte_cdk/sources/file_based/stream/default_file_based_stream.py,sha256=SFb1UXtJtaqo-1t7hM3ahM1ZTH2k01oqX1mAJvz08Y0,19529
|
246
|
-
airbyte_cdk/sources/file_based/stream/identities_stream.py,sha256=
|
245
|
+
airbyte_cdk/sources/file_based/stream/identities_stream.py,sha256=kHFaBn4Wsqi8PYI2z7_aGsjMPA5A4UoPrSMnKfxP4SA,3644
|
247
246
|
airbyte_cdk/sources/file_based/types.py,sha256=INxG7OPnkdUP69oYNKMAbwhvV1AGvLRHs1J6pIia2FI,218
|
248
247
|
airbyte_cdk/sources/http_config.py,sha256=OBZeuyFilm6NlDlBhFQvHhTWabEvZww6OHDIlZujIS0,730
|
249
248
|
airbyte_cdk/sources/http_logger.py,sha256=l_1fk5YwdonZ1wvAsTwjj6d36fj2WrVraIAMj5jTQdM,1575
|
@@ -353,8 +352,8 @@ airbyte_cdk/utils/slice_hasher.py,sha256=-pHexlNYoWYPnXNH-M7HEbjmeJe9Zk7SJijdQ7d
|
|
353
352
|
airbyte_cdk/utils/spec_schema_transformations.py,sha256=-5HTuNsnDBAhj-oLeQXwpTGA0HdcjFOf2zTEMUTTg_Y,816
|
354
353
|
airbyte_cdk/utils/stream_status_utils.py,sha256=ZmBoiy5HVbUEHAMrUONxZvxnvfV9CesmQJLDTAIWnWw,1171
|
355
354
|
airbyte_cdk/utils/traced_exception.py,sha256=C8uIBuCL_E4WnBAOPSxBicD06JAldoN9fGsQDp463OY,6292
|
356
|
-
airbyte_cdk-6.26.0.
|
357
|
-
airbyte_cdk-6.26.0.
|
358
|
-
airbyte_cdk-6.26.0.
|
359
|
-
airbyte_cdk-6.26.0.
|
360
|
-
airbyte_cdk-6.26.0.
|
355
|
+
airbyte_cdk-6.26.0.dev4105.dist-info/LICENSE.txt,sha256=Wfe61S4BaGPj404v8lrAbvhjYR68SHlkzeYrg3_bbuM,1051
|
356
|
+
airbyte_cdk-6.26.0.dev4105.dist-info/METADATA,sha256=oXTY1ZOH5cuzacDgoXEf5pcBYTfKAChqCyN0qmYsxCc,6004
|
357
|
+
airbyte_cdk-6.26.0.dev4105.dist-info/WHEEL,sha256=IYZQI976HJqqOpQU6PHkJ8fb3tMNBFjg-Cn-pwAbaFM,88
|
358
|
+
airbyte_cdk-6.26.0.dev4105.dist-info/entry_points.txt,sha256=fj-e3PAQvsxsQzyyq8UkG1k8spunWnD4BAH2AwlR6NM,95
|
359
|
+
airbyte_cdk-6.26.0.dev4105.dist-info/RECORD,,
|
@@ -1,8 +0,0 @@
|
|
1
|
-
from typing import Literal
|
2
|
-
|
3
|
-
from pydantic.v1 import BaseModel, Field
|
4
|
-
|
5
|
-
|
6
|
-
class IdentitiesStreamConfig(BaseModel):
|
7
|
-
name: Literal["identities"] = Field("identities", const=True, airbyte_hidden=True)
|
8
|
-
domain: str = Field(title="Domain", description="The domain of the identities.")
|
File without changes
|
File without changes
|
{airbyte_cdk-6.26.0.dev4103.dist-info → airbyte_cdk-6.26.0.dev4105.dist-info}/entry_points.txt
RENAMED
File without changes
|