airbyte-cdk 6.45.0.dev4106__py3-none-any.whl → 6.45.0.dev4107__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.
@@ -83,7 +83,7 @@ class FileUploader:
83
83
  logger.info(f"File relative path: {str(file_relative_path)}")
84
84
 
85
85
  record.file_reference = AirbyteRecordMessageFileReference(
86
- file_url=str(full_path),
87
- file_relative_path=str(file_relative_path),
86
+ staging_file_url=str(full_path),
87
+ source_file_relative_path=str(file_relative_path),
88
88
  file_size_bytes=file_size_bytes,
89
89
  )
@@ -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, Callable, Iterable, List, Optional, Set, Tuple, MutableMapping
11
+ from typing import Any, Callable, Iterable, List, MutableMapping, Optional, Set, Tuple
12
12
 
13
13
  from wcmatch.glob import GLOBSTAR, globmatch
14
14
 
@@ -176,7 +176,12 @@ class AbstractFileBasedStreamReader(ABC):
176
176
  """
177
177
  ...
178
178
 
179
- def _get_file_transfer_paths(self, file: RemoteFile, local_directory: str, parse_file_path_from_uri: Optional[Callable] = None) -> MutableMapping[str, Any]:
179
+ def _get_file_transfer_paths(
180
+ self,
181
+ file: RemoteFile,
182
+ local_directory: str,
183
+ parse_file_path_from_uri: Optional[Callable[[str], str]] = None,
184
+ ) -> MutableMapping[str, Any]:
180
185
  preserve_directory_structure = self.preserve_directory_structure()
181
186
  if not parse_file_path_from_uri:
182
187
  file_path = file.uri
@@ -200,6 +205,5 @@ class AbstractFileBasedStreamReader(ABC):
200
205
  self.FILE_NAME: file_name,
201
206
  self.FILE_FOLDER: file_folder,
202
207
  self.SOURCE_FILE_URI: file.uri,
203
-
204
208
  }
205
209
  return file_paths
@@ -18,7 +18,5 @@ class FileRecordData(BaseModel):
18
18
  bytes: int
19
19
 
20
20
  id: Optional[str] = None
21
- created_at: Optional[int] = None
22
- updated_at: Optional[int] = None
21
+ updated_at: Optional[str] = None
23
22
  mime_type: Optional[str] = None
24
- description: Optional[str] = None
@@ -26,10 +26,8 @@ file_transfer_schema = {
26
26
  "file_name": {"type": "string"},
27
27
  "bytes": {"type": "integer"},
28
28
  "id": {"type": ["null", "string"]},
29
- "created_at": {"type": ["null", "integer"]},
30
- "updated_at": {"type": ["null", "integer"]},
29
+ "updated_at": {"type": ["null", "string"]},
31
30
  "mime_type": {"type": ["null", "string"]},
32
- "description": {"type": ["null", "string"]},
33
31
  },
34
32
  }
35
33
 
@@ -198,6 +198,14 @@ def find_template(resource: str, execution_folder: str) -> Dict[str, Any]:
198
198
  return json.load(template_file) # type: ignore # we assume the dev correctly set up the resource file
199
199
 
200
200
 
201
+ def find_binary_response(resource: str, execution_folder: str) -> bytes:
202
+ response_filepath = str(
203
+ get_unit_test_folder(execution_folder) / "resource" / "http" / "response" / f"{resource}"
204
+ )
205
+ with open(response_filepath, "rb") as response_file:
206
+ return response_file.read() # type: ignore # we assume the dev correctly set up the resource file
207
+
208
+
201
209
  def create_record_builder(
202
210
  response_template: Dict[str, Any],
203
211
  records_path: Union[FieldPath, NestedPath],
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: airbyte-cdk
3
- Version: 6.45.0.dev4106
3
+ Version: 6.45.0.dev4107
4
4
  Summary: A framework for writing Airbyte Connectors.
5
5
  Home-page: https://airbyte.com
6
6
  License: MIT
@@ -170,7 +170,7 @@ airbyte_cdk/sources/declarative/resolvers/config_components_resolver.py,sha256=d
170
170
  airbyte_cdk/sources/declarative/resolvers/http_components_resolver.py,sha256=AiojNs8wItJFrENZBFUaDvau3sgwudO6Wkra36upSPo,4639
171
171
  airbyte_cdk/sources/declarative/retrievers/__init__.py,sha256=nQepwG_RfW53sgwvK5dLPqfCx0VjsQ83nYoPjBMAaLM,527
172
172
  airbyte_cdk/sources/declarative/retrievers/async_retriever.py,sha256=6oZtnCHm9NdDvjTSrVwPQOXGSdETSIR7eWH2vFjM7jI,4855
173
- airbyte_cdk/sources/declarative/retrievers/file_uploader.py,sha256=5hNGned-ATe4siXg_oJxcGbn6qwYViCZ1buN1i1DPe0,3348
173
+ airbyte_cdk/sources/declarative/retrievers/file_uploader.py,sha256=Om8vaDHix_1EXxEDVpRP57R94KmBmzJJLWtgxDJ5P8E,3363
174
174
  airbyte_cdk/sources/declarative/retrievers/retriever.py,sha256=XPLs593Xv8c5cKMc37XzUAYmzlXd1a7eSsspM-CMuWA,1696
175
175
  airbyte_cdk/sources/declarative/retrievers/simple_retriever.py,sha256=p6O4FYS7zzPq6uQT2NVnughUjI66tePaXVlyhCAyyv0,27746
176
176
  airbyte_cdk/sources/declarative/schema/__init__.py,sha256=xU45UvM5O4c1PSM13UHpCdh5hpW3HXy9vRRGEiAC1rg,795
@@ -216,8 +216,8 @@ 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=9ZLw_bOGsEknHEq7oj4u-hHiSIhI06SjKLppnS56bRg,7589
220
- airbyte_cdk/sources/file_based/file_record_data.py,sha256=HXduy_owayUhgmbuswOl5UnszWPUAkRiNhDJgZVCVZI,471
219
+ airbyte_cdk/sources/file_based/file_based_stream_reader.py,sha256=m70_TP1dlC54VWcL01uHSMSu-VZ5SEzsTJ9c43ycISk,7639
220
+ airbyte_cdk/sources/file_based/file_record_data.py,sha256=FqqVLzJlkT6ajW1ncoB8K99CvS8jZThafNzjsGGBQhM,396
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
223
223
  airbyte_cdk/sources/file_based/file_types/csv_parser.py,sha256=QlCXB-ry3np67Q_VerQEPoWDOTcPTB6Go4ydZxY9ae4,20445
@@ -228,7 +228,7 @@ airbyte_cdk/sources/file_based/file_types/jsonl_parser.py,sha256=GwyNyxmST4RX-Xp
228
228
  airbyte_cdk/sources/file_based/file_types/parquet_parser.py,sha256=XenFg5sJ-UBnIkSmsiNJRou11NO0zZXx-RXgPHMT2NA,10487
229
229
  airbyte_cdk/sources/file_based/file_types/unstructured_parser.py,sha256=2TYOQl62FQPCa8otLbkDIk_j01EP3oWaKSfXGhCjCHg,19492
230
230
  airbyte_cdk/sources/file_based/remote_file.py,sha256=yqRz93vPe8PBXLIMJ5W5u2JRlZRhg6sBrAjn3pPjJ8A,315
231
- airbyte_cdk/sources/file_based/schema_helpers.py,sha256=9rmjlTSehwr7SeTFxQK_TaUTVZqBHHEzq0D6Cg5UTZQ,9924
231
+ airbyte_cdk/sources/file_based/schema_helpers.py,sha256=rtyay5yy0khfZ9Fj4zZ512zBgNXnLXBR-8r85SUu9B8,9817
232
232
  airbyte_cdk/sources/file_based/schema_validation_policies/__init__.py,sha256=FkByIyEy56x2_awYnxGPqGaOp7zAzpAoRkPZHKySI9M,536
233
233
  airbyte_cdk/sources/file_based/schema_validation_policies/abstract_schema_validation_policy.py,sha256=kjvX7nOmUALYd7HuZHilUzgJPZ-MnZ08mtvuBnt2tQ0,618
234
234
  airbyte_cdk/sources/file_based/schema_validation_policies/default_schema_validation_policies.py,sha256=vjTlmYT_nqzY3DbT5xem7X-bwgA9RyXHoKFqiMO2URk,1728
@@ -336,7 +336,7 @@ airbyte_cdk/test/mock_http/matcher.py,sha256=4Qj8UnJKZIs-eodshryce3SN1Ayc8GZpBET
336
336
  airbyte_cdk/test/mock_http/mocker.py,sha256=XgsjMtVoeMpRELPyALgrkHFauH9H5irxrz1Kcxh2yFY,8013
337
337
  airbyte_cdk/test/mock_http/request.py,sha256=tdB8cqk2vLgCDTOKffBKsM06llYs4ZecgtH6DKyx6yY,4112
338
338
  airbyte_cdk/test/mock_http/response.py,sha256=s4-cQQqTtmeej0pQDWqmG0vUWpHS-93lIWMpW3zSVyU,662
339
- airbyte_cdk/test/mock_http/response_builder.py,sha256=debPx_lRYBaQVSwCoKLa0F8KFk3h0qG7bWxFBATa0cc,7958
339
+ airbyte_cdk/test/mock_http/response_builder.py,sha256=F-v7ebftqGj7YVIMLKdodmU9U8Dq8aIyllWGo2NGwHc,8331
340
340
  airbyte_cdk/test/state_builder.py,sha256=kLPql9lNzUJaBg5YYRLJlY_Hy5JLHJDVyKPMZMoYM44,946
341
341
  airbyte_cdk/test/utils/__init__.py,sha256=Hu-1XT2KDoYjDF7-_ziDwv5bY3PueGjANOCbzeOegDg,57
342
342
  airbyte_cdk/test/utils/data.py,sha256=CkCR1_-rujWNmPXFR1IXTMwx1rAl06wAyIKWpDcN02w,820
@@ -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.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,,
363
+ airbyte_cdk-6.45.0.dev4107.dist-info/LICENSE.txt,sha256=Wfe61S4BaGPj404v8lrAbvhjYR68SHlkzeYrg3_bbuM,1051
364
+ airbyte_cdk-6.45.0.dev4107.dist-info/LICENSE_SHORT,sha256=aqF6D1NcESmpn-cqsxBtszTEnHKnlsp8L4x9wAh3Nxg,55
365
+ airbyte_cdk-6.45.0.dev4107.dist-info/METADATA,sha256=eTB8rrpU5-qI1FOFaxu05Wzvvq3jeLIll-bGbKVGm2Q,6079
366
+ airbyte_cdk-6.45.0.dev4107.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
367
+ airbyte_cdk-6.45.0.dev4107.dist-info/entry_points.txt,sha256=fj-e3PAQvsxsQzyyq8UkG1k8spunWnD4BAH2AwlR6NM,95
368
+ airbyte_cdk-6.45.0.dev4107.dist-info/RECORD,,