+ Flink Users
From: Yun Tang
Sent: Monday, January 28, 2019 19:46
To: Soheil Pourbafrani
Subject: Re: How to infer table schema from Avro file
Hi Soheil
You should provide your generated Avro record class as the type of
AvroInputFormat not Avro's GenericRecord
Hi, I load an Avro file in a Flink Dataset:
AvroInputFormat test = new AvroInputFormat(
new Path("PathToAvroFile)
, GenericRecord.class);
DataSet DS = env.createInput(test);
usersDS.print();
and here are the results of printing DS:
{"N_NATIONKEY": 14, "N_NAME": "KENYA",