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

[BEAM-11460] Support reading Parquet files with unknown schema #13616

Merged
merged 9 commits into from
Dec 25, 2020
Merged

[BEAM-11460] Support reading Parquet files with unknown schema #13616

merged 9 commits into from
Dec 25, 2020

Conversation

anantdamle
Copy link
Contributor

Data engineers encounter times when schema of Parquet file is unknown at the time of writing the pipeline or multiple schema may be present in different files. Reading Parquet files using ParquetIO requires providing an Avro (equivalent) schema, Many a times its not possible to know the schema of the Parquet files.
On the other hand AvroIO supports reading unknow schema files by providing a parse function : #parseGenericRecords(SerializableFunction<GenericRecord,T>)

Supporting this functionality in ParquetIO is simple and requires minimal changes to the ParquetIO surface.


Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:

Post-Commit Tests Status (on master branch)

Lang SDK Dataflow Flink Samza Spark Twister2
Go Build Status --- Build Status --- Build Status ---
Java Build Status Build Status
Build Status
Build Status
Build Status
Build Status
Build Status
Build Status
Build Status Build Status
Build Status
Build Status
Build Status
Python Build Status
Build Status
Build Status
Build Status
Build Status
Build Status
Build Status
Build Status
--- Build Status ---
XLang Build Status Build Status Build Status --- Build Status ---

Pre-Commit Tests Status (on master branch)

--- Java Python Go Website Whitespace Typescript
Non-portable Build Status Build Status
Build Status
Build Status
Build Status
Build Status Build Status Build Status Build Status
Portable --- Build Status --- --- --- ---

See .test-infra/jenkins/README for trigger phrase, status and link of all Jenkins jobs.

GitHub Actions Tests Status (on master branch)

Build python source distribution and wheels
Python tests
Java tests

See CI.md for more information about GitHub Actions CI.

@anantdamle
Copy link
Contributor Author

@aromanenko-dev @iemejia have made all the requested changes. Kindly review.

Copy link
Member

@iemejia iemejia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM Thanks @anantdamle !

If you feel motivated to do one easy contribution, documenting and enabling ParquetIO to use Beam schemas (as AvroIO does) could be interesting. Feel free to take this issue if you feel motivated
https://issues.apache.org/jira/browse/BEAM-11526

@iemejia iemejia merged commit 8149158 into apache:master Dec 25, 2020
@anantdamle anantdamle deleted the read_genericrecord_parquetio branch December 25, 2020 10:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants