Member since
05-31-2015
1
Post
3
Kudos Received
1
Solution
My Accepted Solutions
Title | Views | Posted |
---|---|---|
9930 | 05-31-2015 07:58 AM |
05-31-2015
07:58 AM
3 Kudos
Hi, I've solved the issue jsut by executing the following commands in the hive console: DROP TABLE IF EXISTS categories; DROP TABLE IF EXISTS customers; DROP TABLE IF EXISTS departments; DROP TABLE IF EXISTS orders; DROP TABLE IF EXISTS order_items; DROP TABLE IF EXISTS products; CREATE EXTERNAL TABLE categories 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 'hdfs:///user/hive/warehouse/categories' TBLPROPERTIES ('avro.schema.url'='hdfs://if3f8-cldramaster-01/user/examples/sqoop_import_categories.avsc'); CREATE EXTERNAL TABLE customers 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 'hdfs:///user/hive/warehouse/customers' TBLPROPERTIES ('avro.schema.url'='hdfs://if3f8-cldramaster-01/user/examples/sqoop_import_customers.avsc'); CREATE EXTERNAL TABLE departments 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 'hdfs:///user/hive/warehouse/departments' TBLPROPERTIES ('avro.schema.url'='hdfs://if3f8-cldramaster-01/user/examples/sqoop_import_departments.avsc'); CREATE EXTERNAL TABLE orders 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 'hdfs:///user/hive/warehouse/orders' TBLPROPERTIES ('avro.schema.url'='hdfs://if3f8-cldramaster-01/user/examples/sqoop_import_orders.avsc'); CREATE EXTERNAL TABLE order_items 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 'hdfs:///user/hive/warehouse/order_items' TBLPROPERTIES ('avro.schema.url'='hdfs://if3f8-cldramaster-01/user/examples/sqoop_import_order_items.avsc'); CREATE EXTERNAL TABLE products 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 'hdfs:///user/hive/warehouse/products' TBLPROPERTIES ('avro.schema.url'='hdfs://if3f8-cldramaster-01/user/examples/sqoop_import_products.avsc'); Thanks for all the suggestions from the community!
... View more