[ 
https://issues.apache.org/jira/browse/BEAM-11460?focusedWorklogId=528224&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-528224
 ]

ASF GitHub Bot logged work on BEAM-11460:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 24/Dec/20 17:30
            Start Date: 24/Dec/20 17:30
    Worklog Time Spent: 10m 
      Work Description: iemejia commented on a change in pull request #13554:
URL: https://github.com/apache/beam/pull/13554#discussion_r548641539



##########
File path: CHANGES.md
##########
@@ -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))

Review comment:
       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.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Issue Time Tracking
-------------------

    Worklog Id:     (was: 528224)
    Time Spent: 1h 20m  (was: 1h 10m)

> Support reading Parquet files with unknown schema
> -------------------------------------------------
>
>                 Key: BEAM-11460
>                 URL: https://issues.apache.org/jira/browse/BEAM-11460
>             Project: Beam
>          Issue Type: New Feature
>          Components: io-java-parquet
>            Reporter: Anant Damle
>            Priority: P1
>              Labels: Parquet
>   Original Estimate: 336h
>          Time Spent: 1h 20m
>  Remaining Estimate: 0h
>
> 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|https://beam.apache.org/releases/javadoc/2.26.0/org/apache/beam/sdk/io/AvroIO.html]
>  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.
> {code} 
> Pipeline p = ...;
> PCollection<String> filepatterns = p.apply(...);
> PCollection<Foo> records =
>      filepatterns
>          .apply(FileIO.matchAll())
>          .apply(FileIO.readMatches())
>          .apply(ParquetIO.parseGenericRecords(new 
> SerializableFunction<GenericRecord, Foo>() {
>              public Foo apply(GenericRecord record) { 
>                // If needed, access the schema of the record using 
> record.getSchema()                
>                return ...;             
>              }
>           })); 
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to