1

Is it possible to create an external table on Hive 1.2 from an avro file without specifying the schema and make Hive extract it from data ?

I've found this solution but I'm wondering if Hive can extract the schema itself.

Thanks

Ben Watson
  • 5,357
  • 4
  • 42
  • 65
error
  • 926
  • 3
  • 10
  • 19

1 Answers1

1

Hive cannot extract the schema from the data. In order to read the data from the avro files in HDFS using a Hive query, Hive requires a schema.

So the solution you have found in the correct way of creating external table by taking the schema out of the file using "avro-tools". This way, the schema and the data resides in HDFS and referred from there by Hive.

Hope this helps!

Gomz
  • 850
  • 7
  • 17