Skip to content

Commit e68873a

Browse files
committed
file-mode-api: minor fix for schema not having extra fields
1 parent abeba93 commit e68873a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

airbyte_cdk/sources/file_based/stream/default_file_based_stream.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,8 @@ def cursor_field(self) -> Union[str, List[str]]:
239239

240240
@cache
241241
def get_json_schema(self) -> JsonSchema:
242+
if self.use_file_transfer:
243+
return file_transfer_schema
242244
extra_fields = {
243245
self.ab_last_mod_col: {"type": "string"},
244246
self.ab_file_name_col: {"type": "string"},
@@ -262,9 +264,7 @@ def get_json_schema(self) -> JsonSchema:
262264
return {"type": "object", "properties": {**extra_fields, **schema["properties"]}}
263265

264266
def _get_raw_json_schema(self) -> JsonSchema:
265-
if self.use_file_transfer:
266-
return file_transfer_schema
267-
elif self.config.input_schema:
267+
if self.config.input_schema:
268268
return self.config.get_input_schema() # type: ignore
269269
elif self.config.schemaless:
270270
return schemaless_schema

0 commit comments

Comments
 (0)