Skip to content
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

Fix read of Pandas json for S3 and GCS custom XCOM backend #961

Merged
merged 3 commits into from
Apr 13, 2023

Conversation

pankajkoti
Copy link
Collaborator

The downloaded file content from AWS and Google hook return bytes instance which the pandas read_json cannot read; hence, we fix this by converting it to BytesIO instance which the pandas read_json method reads well.

closes: #955

@codecov
Copy link

codecov bot commented Apr 13, 2023

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (219b405) 98.62% compared to head (e05254c) 98.62%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #961   +/-   ##
=======================================
  Coverage   98.62%   98.62%           
=======================================
  Files          90       90           
  Lines        5011     5017    +6     
=======================================
+ Hits         4942     4948    +6     
  Misses         69       69           
Impacted Files Coverage Δ
...stronomer/providers/amazon/aws/xcom_backends/s3.py 100.00% <100.00%> (ø)
...onomer/providers/google/cloud/xcom_backends/gcs.py 100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

The downloaded file content from AWS and Google hook return bytes
instance which the pandas read_json cannot read and hence we fix
this by converting it to BytesIO instance which the pandas
read_json method reads well.

closes: #955
@phanikumv phanikumv merged commit 272e63a into main Apr 13, 2023
@phanikumv phanikumv deleted the fix-dataframe-custom-xcom branch April 13, 2023 10:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

GCS custom xcom backend does not work with pandas Dataframes (expects str got bytes)
4 participants