CREATE EXTERNAL TABLE avrocountry
 ROW FORMAT SERDE 'org.apache.hadoop.hive.serde2.avro.AvroSerDe'
 STORED AS
 INPUTFORMAT 'org.apache.hadoop.hive.ql.io.avro.AvroContainerInputFormat'
 OUTPUTFORMAT 'org.apache.hadoop.hive.ql.io.avro.AvroContainerOutputFormat'
 LOCATION '/user/sandeepkaranth/avrocountrydata'
 
 TBLPROPERTIES ( 'avro.schema.literal'='
 {"namespace": "MasteringHadoop.avro",
  "type": "record",
  "name": "Country",
  "fields": [
      {"name": "countryCode", "type": "string"},
      {"name": "countryName",  "type": "string"}
  ]
 }')
 ;
 
 
