0
votes

I have created a table with a bucket

CREATE TABLE empl_buck ( EmpID INT, EmpName STRING, Salary FLOAT, DOJ STRING ) CLUSTERED BY (DOJ) INTO 4 Buckets ROW FORMAT DELIMITED FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n';

Enfonced Bucketing:

SET hive.enforce.bucketing=true;

Loaded the data:

LOAD DATA LOCAL INPATH '/home/jugal/Desktop' INTO TABLE empl_buck;

Now how to view the bucketed data which is stored in the textfile or the other formats in the HDFS?

1

1 Answers

1
votes

In hive table data is stored in HDFS. So you can simply go to the HDFS location of the table and you will see the file containing data under the table directory.

To see the HDFS location of the table,

Desc formatted tablename;

The above command wil give you lot of information reg the table including where the table data is stored in HDFS. Go t the HDFS location and you will get the data file.