Lijuan Hou
09/07/2023, 4:48 PMAvroInputFormat :
String s3Path =
"s3://...";
AvroInputFormat<CustomerSession> avroInputFormat =
new AvroInputFormat<>(new Path(s3Path), CustomerSession.class);
TypeInformation<CustomerSession> typeInfo = TypeInformation.of(CustomerSession.class);
DataStream<CustomerSession> datastream = env.createInput(avroInputFormat, typeInfo);
But encountered this error in the job:
org.apache.avro.AvroTypeException: Found KafkaRecord, expecting object.analytical.CustomerSession, missing required field channel
Is it related to the way implementing reading from s3 path part using AvroInputFormat? Shall I switch to FileSource instead? Thank you!