title: Hive Execution Error
body: <p>I am new to avro and hive and while learning it i got some confusion. Using </p>
  
  <p><code>tblproperties('avro.schema.url'='somewhereinHDFS/categories.avsc')</code>.</p>
  
  <p>If I run this <code>create</code> command like </p>
  
  <pre><code>create table categories (id Int , dep_Id Int , name String) 
  stored as avrofile  
  tblproperties('avro.schema.url'=
  'hdfs://quickstart.cloudera/user/cloudera/data/retail_avro_avsc/categories.avsc')
  </code></pre>
  
  <p>but why should i use <code>id Int, dep_Id Int</code> in above command even if i am giving <code>avsc</code> file which contains complete schema.</p>
  
  <pre><code>create table categories stored as avrofile
  tblproperties('avro/schema.url'=
  'hdfs://quickstart.cloudera/user/cloudera/data/retail_avro_avsc/categories.avsc')
  </code></pre>
  
  <blockquote>
    <p></p>
  </blockquote>
  
  <pre><code>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>Why does hive need to specify the schema even if the <code>avsc</code> file is present and it already contains the schema?</p>