Anand, The problem looks like you're trying to convert regular JSON rather than Avro JSON. Avro JSON adds an extra layer when storing unions that encodes the type of the union option, which allows Avro to differentiate between situations like floats and doubles that look identical in the JSON encoding.
If you want to convert normal JSON to an Avro schema, try using this reader: https://github.com/rdblue/parquet-cli/blob/master/src/main/java/org/apache/parquet/cli/json/AvroJsonReader.java rb On Sun, Nov 6, 2016 at 7:36 PM, Kamesh Kompella <kam...@chooxy.com> wrote: > How are you doing the conversion? Can you supply the Avro schema that you > are using? > > Regards > Kamesh > > > On Nov 4, 2016, at 5:10 AM, Anand K <anand.ios.andr...@gmail.com> wrote: > > > > Hello, > > > > I am getting this issue while converting json to avro. PFA my sample > files, please help me out as to how can I achieve this. > > > > > > Exception in thread "main" org.apache.avro.AvroTypeException: Expected > start-union. Got VALUE_STRING > > > > > > > > > > > > Thank you, > > Anand > > <test.json> > > -- Ryan Blue Software Engineer Netflix