title: How to build Avro Hive table based on avro files with schema inside?
body: <p>We have a dataset in Avro format with schema inside each Avro file.</p>
  
  <p>I want to build Hive table on top of these files,</p>
  
  <p>I got the below recommendation from an old question asked here in the community:</p>
  
  <p>CREATE EXTERNAL TABLE sampe_table STORED AS AVRO LOCATION 'hdfs:///user/hive/;</p>
  
  <p>But whenever I try it I get always the error:</p>
  
  <pre><code> java.lang.Exception: java.sql.SQLException: Error while processing statement: FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask. java.lang.RuntimeException: MetaException(message:org.apache.hadoop.hive.serde2.SerDeException Encountered AvroSerdeException determining schema. Returning signal schema to indicate problem: Neither avro.schema.literal nor avro.schema.url specified, can't determine table schema)
  </code></pre>
  
  <p>Any Suggestions? or do you know any online tool that can split Schema from the file?</p>