-
Notifications
You must be signed in to change notification settings - Fork 14.4k
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
Sql to gcs with exclude columns #23695
Merged
potiuk
merged 12 commits into
apache:main
from
jaegwonseo:sql_to_gcs_with_exclude_columns
May 22, 2022
Merged
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
c2a5e72
add exclude_columns parameter to BaseSQLToGCSOperator class
jaegwonseo 783390c
add docs sql_to_gcs.py
jaegwonseo d68afc0
bug fix
jaegwonseo 003aa8e
add test
jaegwonseo 17ed3c2
bug fix
jaegwonseo d58e2fd
apply isort
jaegwonseo b7cc954
apply black
jaegwonseo 6a063f6
change input arg(exclude_columns) type and default value
jaegwonseo cf46ea8
change test value
jaegwonseo 812e7e5
change schema type
jaegwonseo 458d138
fix formatting
jaegwonseo 0c511b2
Merge branch 'main' into sql_to_gcs_with_exclude_columns
jaegwonseo File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
Binary file not shown.
This file contains 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
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.
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.
Consider casting
excluded_columns
toset
in constructor. Then you can do: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.
If schema is changed to set type, the order of the columns is changed.
It seems better to use a list to keep the order of the columns.
however, it seems good to receive the input value as a set to prevent duplication of the input exclude column.
using exclude_columns as a set to prevent duplication
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.
Sounds good to me, consider
exclude_columns = exclude_columns or set()
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.
@turbaszek
I changed the input type, please check