hililiwei commented on code in PR #6584:
URL: https://github.com/apache/iceberg/pull/6584#discussion_r1072136039


##########
docs/flink-getting-started.md:
##########
@@ -613,6 +613,47 @@ env.execute("Test Iceberg Streaming Read");
 There are other options that we could set by Java API, please see the 
 [IcebergSource#Builder](../../../javadoc/{{% icebergVersion 
%}}/org/apache/iceberg/flink/source/IcebergSource.html).
 
+### Read as Avro GenericRecord
+
+FLIP-27 Iceberg source provides `AvroGenericRecordReaderFunction` that converts
+Flink `RowData` Avro `GenericRecord`. You can use the convert to read from
+Iceberg table as Avro GenericRecord DataStream.
+
+Please make sure `flink-avro` jar is included in the classpath.
+Also `iceberg-flink-runtime` shaded bundle jar can't be used
+because the runtime jar shades the avro package.
+Please use non-shaded `iceberg-flink` jar instead.
+
+```java
+TableLoader tableLoader = ...;
+Table table;
+try (TableLoader loader = tableLoader) {
+    loader.open();
+    table = loader.loadTable();
+}
+
+AvroGenericRecordReaderFunction readerFunction =
+    new AvroGenericRecordReaderFunction(

Review Comment:
   nit: Would it look cleaner if we replaced it with 
`AvroGenericRecordReaderFunction.fromTable(table);`?
   
   



-- 
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.

To unsubscribe, e-mail: [email protected]

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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to