Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

Hive doesn't load data while creating table through table browser in HUE

avatar

I am creating a hive table through table browser using HUE. Type of data to pick is file and It shows data format as per file. I want to import this data while table is being created. After submitting, it only creates table structure but no data inside table. I am using CDH 6.0 

1 REPLY 1

avatar
Expert Contributor

To create a table in this way, there are two steps:

 

  1. CREATE TABLE ...
  2. LOAD DATA INPATH ...

 

The first statement creates the table schema within Hive, and the second directive tells Hive to move the data from the source HDFS directory into the Hive HDFS table directory

 

/user/joe/sales.csv => /user/hive/warehouse/sales/sales.csv

 

The move operation occurs as the 'hive' user, so in order for this to complete, the 'hive' user must have access to perform this move operation in HDFS.  Ensure that the 'hive' user has the correct permissions to move this file into the final location.

 

(Impala, but a lot of overlap with Hive)

https://docs.cloudera.com/documentation/enterprise/6/latest/topics/impala_load_data.html

 

 

Also please note that latest version is 6.3.4 and has lots of benefits over 6.0.

 

https://docs.cloudera.com/documentation/enterprise/6/release-notes/topics/rg_cdh_63_packaging.html