class_docstr: A convenience builder to create reader format that reads individual Avro records from a
  Parquet stream. Only GenericRecord is supported in PyFlink.
  
  .. versionadded:: 1.16.0
class_docstr_tok: ["A","convenience","builder","to","create","reader","format","that","reads","individual","Avro","records","from","a","Parquet","stream",".","Only","GenericRecord","is","supported","in","PyFlink",".","..","versionadded",":",":","1.16.0"]
docstr: Creates a new AvroParquetRecordFormat that reads the parquet file into Avro GenericRecords.
  
  To read into GenericRecords, this method needs an Avro Schema. That is because Flink needs
  to be able to serialize the results in its data flow, which is very inefficient without the
  schema. And while the Schema is stored in the Avro file header, Flink needs this schema
  during 'pre-flight' time when the data flow is set up and wired, which is before there is
  access to the files.
  
  Example:
  ::
  
      >>> env = StreamExecutionEnvironment.get_execution_environment()
      >>> schema = AvroSchema.parse_string(JSON_SCHEMA)
      >>> source = FileSource.for_record_stream_format(
      ...     AvroParquetReaders.for_generic_record(schema),
      ...     PARQUET_FILE_PATH
      ... ).build()
      >>> ds = env.from_source(source, WatermarkStrategy.no_watermarks(), "parquet-source")
  
  :param schema: the Avro Schema.
  :return: StreamFormat for reading Avro GenericRecords.
docstr_tok: ["Creates","a","new","AvroParquetRecordFormat","that","reads","the","parquet","file","into","Avro","GenericRecords",".","To","read","into","GenericRecords",",","this","method","needs","an","Avro","Schema",".","That","is","because","Flink","needs","to","be","able","to","serialize","the","results","in","its","data","flow",",","which","is","very","inefficient","without","the","schema",".","And","while","the","Schema","is","stored","in","the","Avro","file","header",",","Flink","needs","this","schema","during","'pre-flight","'","time","when","the","data","flow","is","set","up","and","wired",",","which","is","before","there","is","access","to","the","files",".","Example",":",":",":",">",">",">","env","=","StreamExecutionEnvironment.get_execution_environment","(",")",">",">",">","schema","=","AvroSchema.parse_string","(","JSON_SCHEMA",")",">",">",">","source","=","FileSource.for_record_stream_format","(","...","AvroParquetReaders.for_generic_record","(","schema",")",",","...","PARQUET_FILE_PATH","...",")",".build","(",")",">",">",">","ds","=","env.from_source","(","source",",","WatermarkStrategy.no_watermarks","(",")",",","``","parquet-source","''",")",":","param","schema",":","the","Avro","Schema",".",":","return",":","StreamFormat","for","reading","Avro","GenericRecords","."]
code: def for_generic_record(schema: "AvroSchema") -> "StreamFormat":
      """
      Creates a new AvroParquetRecordFormat that reads the parquet file into Avro GenericRecords.
  
      To read into GenericRecords, this method needs an Avro Schema. That is because Flink needs
      to be able to serialize the results in its data flow, which is very inefficient without the
      schema. And while the Schema is stored in the Avro file header, Flink needs this schema
      during 'pre-flight' time when the data flow is set up and wired, which is before there is
      access to the files.
  
      Example:
      ::
  
          >>> env = StreamExecutionEnvironment.get_execution_environment()
          >>> schema = AvroSchema.parse_string(JSON_SCHEMA)
          >>> source = FileSource.for_record_stream_format(
          ...     AvroParquetReaders.for_generic_record(schema),
          ...     PARQUET_FILE_PATH
          ... ).build()
          >>> ds = env.from_source(source, WatermarkStrategy.no_watermarks(), "parquet-source")
  
      :param schema: the Avro Schema.
      :return: StreamFormat for reading Avro GenericRecords.
      """
      jvm = get_gateway().jvm
      JAvroParquetReaders = (
          jvm.org.apache.flink.formats.parquet.avro.AvroParquetReaders
      )
      return StreamFormat(
          JAvroParquetReaders.forGenericRecord(schema._j_schema)
      )
  
file_path: flink/flink-python/pyflink/datastream/formats/parquet.py
imports: from typing import Optional, TYPE_CHECKING
  from pyflink.common import Configuration
  from pyflink.common.serialization import BulkWriterFactory, RowDataBulkWriterFactory
  from pyflink.datastream.connectors.file_system import StreamFormat, BulkFormat
  from pyflink.datastream.formats.avro import AvroSchema
  from pyflink.datastream.utils import create_hadoop_configuration
  from pyflink.java_gateway import get_gateway
label_desc: Use image node_id 1 for calling the AvroParquetReaders obj's underlying member method code with example usage: obj.for_generic_record(schema) and returns: StreamFormat