source-file: add support for sheet_name in openpyxl_chunk_reader
#69775
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.
What
The
source-fileconnector'sReader Optionssupports the ability to pass in Panda options to the related type of data. This works for most types, as we use the underlying Panda function, however for Excel files we use a customopenpyxl_chunk_readerby default which does not.This PR adds rudimentary support for
sheet_namein the custom function to keep things consistent with our documentation, as well as allowing users to select a sheet to use (or more).Our general implementation doesn't fully abide by Pandas's in that it notably flattens all columns whereas Pandas's does not, but it keeps it more consistent with our existing behavior.
How
Adds explicit support for the arg with basic filtering logic.
Review guide
Validate it works correctly.
User Impact
No changes for existing users.
Can this PR be safely reverted and rolled back?