Hi Martin!

Using Avro-formatted data should be straightforward with the
AvroInputformat (
https://github.com/apache/incubator-flink/blob/master/flink-addons/flink-avro/src/main/java/org/apache/flink/api/java/io/AvroInputFormat.java
)

Just add "flink-avro" as a Maven dependency and create a DataSet using

ExecutionEnvironment.createInput(new AvroInputFormat<MyAvroType>(new Path(
"/path/to/file"), MyAvroType.class));

You can also have a look at line 225 here:
https://github.com/apache/incubator-flink/blob/master/flink-addons/flink-avro/src/test/java/org/apache/flink/api/avro/testjar/AvroExternalJarProgram.java#L225

Greetings,
Stephan


On Mon, Sep 22, 2014 at 2:16 PM, Martin Neumann <[email protected]>
wrote:

> Hej,
>
> I'm looking for some example code on how to load a avro formatted data set.
>
> I have the Avro Schema (its horrible twisted and nested on several levels)
> and I want to load that into java classes to make it easier to process.
>
> I'm using Flink 0.7 latest snapshot.
>
>
> thanks for the help
> cheers Martin
>

Reply via email to