I used below Avro Schema for writing a dataframe to .avro files using spark/scala.
{ "type": "record", "name": "userid", &