1
0
mirror of synced 2025-12-21 11:01:41 -05:00
Files
airbyte/airbyte-integrations/connectors/source-gcs/source_gcs/stream.py
Daryna Ishchenko 36a1f95a7f chore(source-gcs) update to airbyte-cdk v7 (#66671)
Co-authored-by: Octavia Squidington III <octavia-squidington-iii@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-10-06 18:10:20 +03:00

14 lines
546 B
Python

# Copyright (c) 2024 Airbyte, Inc., all rights reserved.
from typing import Any
from airbyte_cdk.sources.file_based.stream import DefaultFileBasedStream
from source_gcs.helpers import GCSUploadableRemoteFile
class GCSStream(DefaultFileBasedStream):
def transform_record(self, record: dict[str, Any], file: GCSUploadableRemoteFile, last_updated: str) -> dict[str, Any]:
record[self.ab_last_mod_col] = last_updated
record[self.ab_file_name_col] = file.displayed_uri if file.displayed_uri else file.uri
return record