Skip to content

Commit 4644271

Browse files
feat(connector-builder): stop setting the staging_file_url and file_size_bytes fields for the case of a Builder test read. (#631)
1 parent 1733ec3 commit 4644271

File tree

2 files changed

+1
-5
lines changed

2 files changed

+1
-5
lines changed

airbyte_cdk/sources/declarative/retrievers/file_uploader/connector_builder_file_uploader.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,4 @@ class ConnectorBuilderFileUploader(FileUploader):
2121

2222
def upload(self, record: Record) -> None:
2323
self.file_uploader.upload(record=record)
24-
for file_reference_key, file_reference_value in record.file_reference.__dict__.items():
25-
if not file_reference_key.startswith("_"):
26-
record.data[file_reference_key] = file_reference_value # type: ignore
24+
record.data["source_file_relative_path"] = record.file_reference.source_file_relative_path # type: ignore

unit_tests/sources/declarative/file/test_file_stream.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -253,12 +253,10 @@ def __init__(self, *args, **kwargs):
253253

254254
# Assert file reference fields are copied to record data
255255
record_data = output.records[0].record.data
256-
assert record_data["staging_file_url"] == file_reference.staging_file_url
257256
assert (
258257
record_data["source_file_relative_path"]
259258
== file_reference.source_file_relative_path
260259
)
261-
assert record_data["file_size_bytes"] == file_reference.file_size_bytes
262260

263261
def test_discover_article_attachments(self) -> None:
264262
output = discover(self._config())

0 commit comments

Comments
 (0)