Fix null strings bug in SqlToS3Operator in non parquet formats#26676
Merged
potiuk merged 1 commit intoapache:mainfrom Oct 2, 2022
Merged
Fix null strings bug in SqlToS3Operator in non parquet formats#26676potiuk merged 1 commit intoapache:mainfrom
potiuk merged 1 commit intoapache:mainfrom
Conversation
451cd6c to
89a187c
Compare
89a187c to
9d5fa3a
Compare
vincbeck
approved these changes
Sep 27, 2022
38ef0ca to
de949c4
Compare
eladkal
requested changes
Sep 28, 2022
Contributor
There was a problem hiding this comment.
You can parameterize it rather than creating a new test
Contributor
There was a problem hiding this comment.
example:
airflow/tests/sensors/test_weekday_sensor.py
Lines 56 to 78 in 9e06c99
Contributor
Author
There was a problem hiding this comment.
good callout, fixed that up if you want to take another look!
de949c4 to
3f6c65a
Compare
3f6c65a to
d9e97b5
Compare
eladkal
approved these changes
Sep 30, 2022
| @parameterized.expand( | ||
| [ | ||
| ("with-csv", {"file_format": "csv", "null_string_result": None}), | ||
| ("with-parquet", {"file_format": "parquet", "null_string_result": "None"}), |
Contributor
There was a problem hiding this comment.
The operator accept also json format would be cool to add this case also
potiuk
approved these changes
Oct 2, 2022
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
closes: #26567
Once #25083 was merged, when using CSV as the output format on the SqlToS3Operator, null strings started appearing as "None" in the actual CSV export. This will cause unintended behavior in most use cases for reading the CSV including uploading to databases.
This PR restores the original behavior of the null strings and adds unit tests to enforce it going forward.
^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in a newsfragment file, named
{pr_number}.significant.rstor{issue_number}.significant.rst, in newsfragments.