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 #13554

Closed
wants to merge 6 commits into from
Closed

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

wants to merge 6 commits into from

Conversation

anantdamle
Copy link
Contributor

@anantdamle anantdamle commented Dec 15, 2020

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

anantdamle commented Dec 15, 2020

@danielxjd @lgajowy @jbonofre Can you review the feature for reading Parquet files with unknown schema

@anantdamle anantdamle changed the title [BEAM-11460] Implement reading files with unknown schema for ParquetIO [BEAM-11460] Support reading Parquet files with unknown schema Dec 15, 2020
…arseFiles<T>` implementation for supporting files with unknown schema.
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.

Minor comments, looks pretty good thanks for this contribution @anantdamle

anantdamle and others added 3 commits December 24, 2020 22:59
1. Fix Javadoc example by using consistent words
1. Other indentation and space fixes
@aromanenko-dev
Copy link
Contributor

aromanenko-dev commented Dec 24, 2020

@anantdamle Thank you for contribution!

Please, do your changes in the feature branch, not in your master.
https://cwiki.apache.org/confluence/display/BEAM/Git+Tips

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.

Looks nice now. I think I am going to merge this eagerly once the last fix is done @aromanenko-dev. Don't hesitate to bring any extra comments afterwards that we consider we can still improve.

@@ -58,6 +58,7 @@
* ReadFromMongoDB/WriteToMongoDB will mask password in display_data (Python) ([BEAM-11444](https://issues.apache.org/jira/browse/BEAM-11444).)
* Support for X source added (Java/Python) ([BEAM-X](https://issues.apache.org/jira/browse/BEAM-X)).
* There is a new transform `ReadAllFromBigQuery` that can receive multiple requests to read data from BigQuery at pipeline runtime. See [PR 13170](https://github.com/apache/beam/pull/13170), and [BEAM-9650](https://issues.apache.org/jira/browse/BEAM-9650).
* ParquetIO can now read files with an unknown schema. See [PR-13554](https://github.com/apache/beam/pull/13554) and ([BEAM-11460](https://issues.apache.org/jira/browse/BEAM-11460))
Copy link
Member

Choose a reason for hiding this comment

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

Can you move this up to the 2.28.0 section. The 2.27.0 was already merged (sorry I missed this in previous check.

@anantdamle
Copy link
Contributor Author

As the branch needs to change. Created new PR/13616

@anantdamle anantdamle closed this Dec 24, 2020
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.

3 participants