adding avro datam write pattern to format the output data