Support Questions
Find answers, ask questions, and share your expertise

how to create .avsc file

how to create .avsc file

New Contributor

i am trying to create Hive table for avro, but i want to create .avsc file also for declaring schema of avro file using java

  1. CREATE TABLE doctors ROW FORMAT
  2. SERDE 'org.apache.hadoop.hive.serde2.avro.AvroSerDe'
  3. STORED AS
  4. INPUTFORMAT 'org.apache.hadoop.hive.ql.io.avro.AvroContainerInputFormat'
  5. OUTPUTFORMAT 'org.apache.hadoop.hive.ql.io.avro.AvroContainerOutputFormat' TBLPROPERTIES ('schema.avro.url'={'.avsc'}
  6. i have column name and datatype in csv file.
  7. please suggest how to create.