airbyte-cdk 6.45.1.post43.dev14455111666__py3-none-any.whl → 6.45.1.post45.dev14455720154__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 -6
- {airbyte_cdk-6.45.1.post43.dev14455111666.dist-info → airbyte_cdk-6.45.1.post45.dev14455720154.dist-info}/METADATA +1 -1
- {airbyte_cdk-6.45.1.post43.dev14455111666.dist-info → airbyte_cdk-6.45.1.post45.dev14455720154.dist-info}/RECORD +7 -7
- {airbyte_cdk-6.45.1.post43.dev14455111666.dist-info → airbyte_cdk-6.45.1.post45.dev14455720154.dist-info}/LICENSE.txt +0 -0
- {airbyte_cdk-6.45.1.post43.dev14455111666.dist-info → airbyte_cdk-6.45.1.post45.dev14455720154.dist-info}/LICENSE_SHORT +0 -0
- {airbyte_cdk-6.45.1.post43.dev14455111666.dist-info → airbyte_cdk-6.45.1.post45.dev14455720154.dist-info}/WHEEL +0 -0
- {airbyte_cdk-6.45.1.post43.dev14455111666.dist-info → airbyte_cdk-6.45.1.post45.dev14455720154.dist-info}/entry_points.txt +0 -0
@@ -33,7 +33,6 @@ class AbstractFileBasedStreamReader(ABC):
|
|
33
33
|
FILE_RELATIVE_PATH = "file_relative_path"
|
34
34
|
FILE_NAME = "file_name"
|
35
35
|
LOCAL_FILE_PATH = "local_file_path"
|
36
|
-
SOURCE_FILE_URI = "source_file_relative_path"
|
37
36
|
FILE_FOLDER = "file_folder"
|
38
37
|
|
39
38
|
def __init__(self) -> None:
|
@@ -177,10 +176,16 @@ class AbstractFileBasedStreamReader(ABC):
|
|
177
176
|
...
|
178
177
|
|
179
178
|
def _get_file_transfer_paths(
|
180
|
-
self,
|
181
|
-
source_file_relative_path: str,
|
182
|
-
local_directory: str
|
179
|
+
self, source_file_relative_path: str, staging_directory: str
|
183
180
|
) -> MutableMapping[str, Any]:
|
181
|
+
"""
|
182
|
+
This method is used to get the file transfer paths for a given source file relative path and local directory.
|
183
|
+
It returns a dictionary with the following keys:
|
184
|
+
- FILE_RELATIVE_PATH: The relative path to file in reference to the staging directory.
|
185
|
+
- LOCAL_FILE_PATH: The absolute path to the file.
|
186
|
+
- FILE_NAME: The name of the referenced file.
|
187
|
+
- FILE_FOLDER: The folder of the referenced file.
|
188
|
+
"""
|
184
189
|
preserve_directory_structure = self.preserve_directory_structure()
|
185
190
|
|
186
191
|
file_name = path.basename(source_file_relative_path)
|
@@ -190,7 +195,7 @@ class AbstractFileBasedStreamReader(ABC):
|
|
190
195
|
file_relative_path = source_file_relative_path.lstrip("/")
|
191
196
|
else:
|
192
197
|
file_relative_path = file_name
|
193
|
-
local_file_path = path.join(
|
198
|
+
local_file_path = path.join(staging_directory, file_relative_path)
|
194
199
|
# Ensure the local directory exists
|
195
200
|
makedirs(path.dirname(local_file_path), exist_ok=True)
|
196
201
|
|
@@ -198,6 +203,6 @@ class AbstractFileBasedStreamReader(ABC):
|
|
198
203
|
self.FILE_RELATIVE_PATH: file_relative_path,
|
199
204
|
self.LOCAL_FILE_PATH: local_file_path,
|
200
205
|
self.FILE_NAME: file_name,
|
201
|
-
self.FILE_FOLDER: file_folder
|
206
|
+
self.FILE_FOLDER: file_folder,
|
202
207
|
}
|
203
208
|
return file_paths
|
@@ -224,7 +224,7 @@ airbyte_cdk/sources/file_based/discovery_policy/default_discovery_policy.py,sha2
|
|
224
224
|
airbyte_cdk/sources/file_based/exceptions.py,sha256=WP0qkG6fpWoBpOyyicgp5YNE393VWyegq5qSy0v4QtM,7362
|
225
225
|
airbyte_cdk/sources/file_based/file_based_source.py,sha256=Xg8OYWnGc-OcVBglvS08uwAWGWHBhEqsBnyODIkOK-4,20051
|
226
226
|
airbyte_cdk/sources/file_based/file_based_stream_permissions_reader.py,sha256=4e7FXqQ9hueacexC0SyrZyjF8oREYHza8pKF9CgKbD8,5050
|
227
|
-
airbyte_cdk/sources/file_based/file_based_stream_reader.py,sha256=
|
227
|
+
airbyte_cdk/sources/file_based/file_based_stream_reader.py,sha256=rwz8AhEIqYB9gBF7uW9eR--eUiHOntzuwLH8jFHNacE,7854
|
228
228
|
airbyte_cdk/sources/file_based/file_record_data.py,sha256=FqqVLzJlkT6ajW1ncoB8K99CvS8jZThafNzjsGGBQhM,396
|
229
229
|
airbyte_cdk/sources/file_based/file_types/__init__.py,sha256=blCLn0-2LC-ZdgcNyDEhqM2RiUvEjEBh-G4-t32ZtuM,1268
|
230
230
|
airbyte_cdk/sources/file_based/file_types/avro_parser.py,sha256=USEYqiICXBWpDV443VtNOCmUA-GINzY_Zah74_5w3qQ,10860
|
@@ -368,9 +368,9 @@ airbyte_cdk/utils/slice_hasher.py,sha256=EDxgROHDbfG-QKQb59m7h_7crN1tRiawdf5uU7G
|
|
368
368
|
airbyte_cdk/utils/spec_schema_transformations.py,sha256=-5HTuNsnDBAhj-oLeQXwpTGA0HdcjFOf2zTEMUTTg_Y,816
|
369
369
|
airbyte_cdk/utils/stream_status_utils.py,sha256=ZmBoiy5HVbUEHAMrUONxZvxnvfV9CesmQJLDTAIWnWw,1171
|
370
370
|
airbyte_cdk/utils/traced_exception.py,sha256=C8uIBuCL_E4WnBAOPSxBicD06JAldoN9fGsQDp463OY,6292
|
371
|
-
airbyte_cdk-6.45.1.
|
372
|
-
airbyte_cdk-6.45.1.
|
373
|
-
airbyte_cdk-6.45.1.
|
374
|
-
airbyte_cdk-6.45.1.
|
375
|
-
airbyte_cdk-6.45.1.
|
376
|
-
airbyte_cdk-6.45.1.
|
371
|
+
airbyte_cdk-6.45.1.post45.dev14455720154.dist-info/LICENSE.txt,sha256=Wfe61S4BaGPj404v8lrAbvhjYR68SHlkzeYrg3_bbuM,1051
|
372
|
+
airbyte_cdk-6.45.1.post45.dev14455720154.dist-info/LICENSE_SHORT,sha256=aqF6D1NcESmpn-cqsxBtszTEnHKnlsp8L4x9wAh3Nxg,55
|
373
|
+
airbyte_cdk-6.45.1.post45.dev14455720154.dist-info/METADATA,sha256=-V5f5-62pvxYo1MeWJL10Z-S9re1jIKqan4aFWLpzgM,6093
|
374
|
+
airbyte_cdk-6.45.1.post45.dev14455720154.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
|
375
|
+
airbyte_cdk-6.45.1.post45.dev14455720154.dist-info/entry_points.txt,sha256=fj-e3PAQvsxsQzyyq8UkG1k8spunWnD4BAH2AwlR6NM,95
|
376
|
+
airbyte_cdk-6.45.1.post45.dev14455720154.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|