-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(airbyte-cdk): add custom decoder #48450
Conversation
Signed-off-by: Artem Inzhyyants <artem.inzhyyants@gmail.com>
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Skipped Deployment
|
type: string | ||
additionalProperties: true | ||
examples: | ||
- "source_amazon_ads.components.GzipJsonlDecoder" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not put this in the CDK? It feels like an interesting pattern that could be composed (for example, GZIP with JSONL or GZIP with CSV)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Amazon ads has some specific decompress
with utf :
Lines 391 to 394 in a02e386
response = self._send_http_request(url=url, profile_id=profile_id, is_download_report=True) | |
response.raise_for_status() | |
raw_string = decompress(response.content).decode("utf") | |
return json.loads(raw_string) |
I can add a GzipJsonDecoder
with optional encoding field (I guess it would be utf-8
by default). WDYT?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This makes sense to me, thanks @artem1205 !
Signed-off-by: Artem Inzhyyants <artem.inzhyyants@gmail.com>
moved to airbytehq/airbyte-python-cdk#20 |
What
resolving amazon ads low-code async migration
add custom decoder to implement gzip jsonl decoder
How
add custom decoder
Review guide
airbyte-cdk/python/airbyte_cdk/sources/declarative/declarative_component_schema.yaml
airbyte-cdk/python/airbyte_cdk/sources/declarative/models/declarative_component_schema.py
airbyte-cdk/python/airbyte_cdk/sources/declarative/parsers/model_to_component_factory.py
User Impact
Can this PR be safely reverted and rolled back?