Skip to content

Commit

Permalink
Fix gzipdecoder wiring up
Browse files Browse the repository at this point in the history
  • Loading branch information
maxi297 committed Feb 11, 2025
1 parent 47d2036 commit 2ed8636
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@
)
from airbyte_cdk.sources.declarative.models import (
CustomStateMigration,
GzipDecoder,
)
from airbyte_cdk.sources.declarative.models.declarative_component_schema import (
AddedFieldDefinition as AddedFieldDefinitionModel,
Expand Down Expand Up @@ -548,6 +549,7 @@ def _init_mappings(self) -> None:
InlineSchemaLoaderModel: self.create_inline_schema_loader,
JsonDecoderModel: self.create_json_decoder,
JsonlDecoderModel: self.create_jsonl_decoder,
GzipDecoderModel: self.create_gzip_decoder,
KeysToLowerModel: self.create_keys_to_lower_transformation,
KeysToSnakeCaseModel: self.create_keys_to_snake_transformation,
KeysReplaceModel: self.create_keys_replace_transformation,
Expand Down Expand Up @@ -2047,6 +2049,12 @@ def create_jsonl_decoder(model: JsonlDecoderModel, config: Config, **kwargs: Any
parser=ModelToComponentFactory._get_parser(model, config), stream_response=True
)

@staticmethod
def create_gzip_decoder(model: GzipDecoderModel, config: Config, **kwargs: Any) -> Decoder:
return CompositeRawDecoder(
parser=ModelToComponentFactory._get_parser(model, config), stream_response=False
)

@staticmethod
def create_iterable_decoder(
model: IterableDecoderModel, config: Config, **kwargs: Any
Expand Down

0 comments on commit 2ed8636

Please sign in to comment.