airbyte-cdk 6.45.0.dev4104__py3-none-any.whl → 6.45.0.dev4106__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/file_based_stream_reader.py +11 -7
- {airbyte_cdk-6.45.0.dev4104.dist-info → airbyte_cdk-6.45.0.dev4106.dist-info}/METADATA +2 -2
- {airbyte_cdk-6.45.0.dev4104.dist-info → airbyte_cdk-6.45.0.dev4106.dist-info}/RECORD +7 -7
- {airbyte_cdk-6.45.0.dev4104.dist-info → airbyte_cdk-6.45.0.dev4106.dist-info}/LICENSE.txt +0 -0
- {airbyte_cdk-6.45.0.dev4104.dist-info → airbyte_cdk-6.45.0.dev4106.dist-info}/LICENSE_SHORT +0 -0
- {airbyte_cdk-6.45.0.dev4104.dist-info → airbyte_cdk-6.45.0.dev4106.dist-info}/WHEEL +0 -0
- {airbyte_cdk-6.45.0.dev4104.dist-info → airbyte_cdk-6.45.0.dev4106.dist-info}/entry_points.txt +0 -0
@@ -8,7 +8,7 @@ from datetime import datetime
|
|
8
8
|
from enum import Enum
|
9
9
|
from io import IOBase
|
10
10
|
from os import makedirs, path
|
11
|
-
from typing import Any, Iterable, List, Optional, Set, Tuple, MutableMapping
|
11
|
+
from typing import Any, Callable, Iterable, List, Optional, Set, Tuple, MutableMapping
|
12
12
|
|
13
13
|
from wcmatch.glob import GLOBSTAR, globmatch
|
14
14
|
|
@@ -176,14 +176,18 @@ class AbstractFileBasedStreamReader(ABC):
|
|
176
176
|
"""
|
177
177
|
...
|
178
178
|
|
179
|
-
def _get_file_transfer_paths(self, file: RemoteFile, local_directory: str) -> MutableMapping[str, Any]:
|
179
|
+
def _get_file_transfer_paths(self, file: RemoteFile, local_directory: str, parse_file_path_from_uri: Optional[Callable] = None) -> MutableMapping[str, Any]:
|
180
180
|
preserve_directory_structure = self.preserve_directory_structure()
|
181
|
-
|
182
|
-
|
183
|
-
|
181
|
+
if not parse_file_path_from_uri:
|
182
|
+
file_path = file.uri
|
183
|
+
else:
|
184
|
+
file_path = parse_file_path_from_uri(file.uri)
|
185
|
+
|
186
|
+
file_name = path.basename(file_path)
|
187
|
+
file_folder = path.dirname(file_path)
|
184
188
|
if preserve_directory_structure:
|
185
189
|
# Remove left slashes from source path format to make relative path for writing locally
|
186
|
-
file_relative_path =
|
190
|
+
file_relative_path = file_path.lstrip("/")
|
187
191
|
else:
|
188
192
|
file_relative_path = file_name
|
189
193
|
local_file_path = path.join(local_directory, file_relative_path)
|
@@ -195,7 +199,7 @@ class AbstractFileBasedStreamReader(ABC):
|
|
195
199
|
self.LOCAL_FILE_PATH: local_file_path,
|
196
200
|
self.FILE_NAME: file_name,
|
197
201
|
self.FILE_FOLDER: file_folder,
|
198
|
-
self.SOURCE_FILE_URI:
|
202
|
+
self.SOURCE_FILE_URI: file.uri,
|
199
203
|
|
200
204
|
}
|
201
205
|
return file_paths
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: airbyte-cdk
|
3
|
-
Version: 6.45.0.
|
3
|
+
Version: 6.45.0.dev4106
|
4
4
|
Summary: A framework for writing Airbyte Connectors.
|
5
5
|
Home-page: https://airbyte.com
|
6
6
|
License: MIT
|
@@ -22,7 +22,7 @@ Provides-Extra: sql
|
|
22
22
|
Provides-Extra: vector-db-based
|
23
23
|
Requires-Dist: Jinja2 (>=3.1.2,<3.2.0)
|
24
24
|
Requires-Dist: PyYAML (>=6.0.1,<7.0.0)
|
25
|
-
Requires-Dist: airbyte-protocol-models-dataclasses (
|
25
|
+
Requires-Dist: airbyte-protocol-models-dataclasses (>=0.15,<0.16)
|
26
26
|
Requires-Dist: anyascii (>=0.3.2,<0.4.0)
|
27
27
|
Requires-Dist: avro (>=1.11.2,<1.13.0) ; extra == "file-based"
|
28
28
|
Requires-Dist: backoff
|
@@ -216,7 +216,7 @@ airbyte_cdk/sources/file_based/discovery_policy/default_discovery_policy.py,sha2
|
|
216
216
|
airbyte_cdk/sources/file_based/exceptions.py,sha256=WP0qkG6fpWoBpOyyicgp5YNE393VWyegq5qSy0v4QtM,7362
|
217
217
|
airbyte_cdk/sources/file_based/file_based_source.py,sha256=bIsut7ivHcl7YPO9cygDn0to23MRLu1Sym7jSr0Iy9A,20051
|
218
218
|
airbyte_cdk/sources/file_based/file_based_stream_permissions_reader.py,sha256=4e7FXqQ9hueacexC0SyrZyjF8oREYHza8pKF9CgKbD8,5050
|
219
|
-
airbyte_cdk/sources/file_based/file_based_stream_reader.py,sha256=
|
219
|
+
airbyte_cdk/sources/file_based/file_based_stream_reader.py,sha256=9ZLw_bOGsEknHEq7oj4u-hHiSIhI06SjKLppnS56bRg,7589
|
220
220
|
airbyte_cdk/sources/file_based/file_record_data.py,sha256=HXduy_owayUhgmbuswOl5UnszWPUAkRiNhDJgZVCVZI,471
|
221
221
|
airbyte_cdk/sources/file_based/file_types/__init__.py,sha256=blCLn0-2LC-ZdgcNyDEhqM2RiUvEjEBh-G4-t32ZtuM,1268
|
222
222
|
airbyte_cdk/sources/file_based/file_types/avro_parser.py,sha256=XNx-JC-sgzH9u3nOJ2M59FxBXvtig8LN6BIkeDOavZA,10858
|
@@ -360,9 +360,9 @@ airbyte_cdk/utils/slice_hasher.py,sha256=EDxgROHDbfG-QKQb59m7h_7crN1tRiawdf5uU7G
|
|
360
360
|
airbyte_cdk/utils/spec_schema_transformations.py,sha256=-5HTuNsnDBAhj-oLeQXwpTGA0HdcjFOf2zTEMUTTg_Y,816
|
361
361
|
airbyte_cdk/utils/stream_status_utils.py,sha256=ZmBoiy5HVbUEHAMrUONxZvxnvfV9CesmQJLDTAIWnWw,1171
|
362
362
|
airbyte_cdk/utils/traced_exception.py,sha256=C8uIBuCL_E4WnBAOPSxBicD06JAldoN9fGsQDp463OY,6292
|
363
|
-
airbyte_cdk-6.45.0.
|
364
|
-
airbyte_cdk-6.45.0.
|
365
|
-
airbyte_cdk-6.45.0.
|
366
|
-
airbyte_cdk-6.45.0.
|
367
|
-
airbyte_cdk-6.45.0.
|
368
|
-
airbyte_cdk-6.45.0.
|
363
|
+
airbyte_cdk-6.45.0.dev4106.dist-info/LICENSE.txt,sha256=Wfe61S4BaGPj404v8lrAbvhjYR68SHlkzeYrg3_bbuM,1051
|
364
|
+
airbyte_cdk-6.45.0.dev4106.dist-info/LICENSE_SHORT,sha256=aqF6D1NcESmpn-cqsxBtszTEnHKnlsp8L4x9wAh3Nxg,55
|
365
|
+
airbyte_cdk-6.45.0.dev4106.dist-info/METADATA,sha256=TxmBjamPOyqqh6l1zQWq_4zCG9U-xa1Ux7eUpgCOhMI,6079
|
366
|
+
airbyte_cdk-6.45.0.dev4106.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
|
367
|
+
airbyte_cdk-6.45.0.dev4106.dist-info/entry_points.txt,sha256=fj-e3PAQvsxsQzyyq8UkG1k8spunWnD4BAH2AwlR6NM,95
|
368
|
+
airbyte_cdk-6.45.0.dev4106.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
{airbyte_cdk-6.45.0.dev4104.dist-info → airbyte_cdk-6.45.0.dev4106.dist-info}/entry_points.txt
RENAMED
File without changes
|