What is the syntax for creating bucketing table in hive?

0 votes

Hey,

Can anyone tell me what is the syntax for creating bucketing table in hive?

May 16 in Big Data Hadoop by daina
37 views

1 answer to this question.

0 votes

Hi,

Syntax for creating bucketed table is as follows:

create table page_views(user_id INT, session_id  INT, url STRING) PARTITIONED BY  (day INT) CLUSTERED BY (user_id) INTO 10;
Here the data would be classified depending upon hash number of user_id into 10 buckets. So when someone queries for certain user_id, the processor will first calculate the hash number of the user_id in query and will look for only that bucket.
answered May 16 by Gitika
• 19,720 points

Related Questions In Big Data Hadoop

0 votes
1 answer

what is the difference between CREATE TABLE and CREATE EXTERNAL TABLE in Hive?

Hey, Although, we can create two types of ...READ MORE

answered Jun 26 in Big Data Hadoop by Gitika
• 19,720 points
26 views
0 votes
1 answer

What is the syntax for HiveQL SELECT Statement?

Hey,  You can use this  syntax below: SELECT [ALL ...READ MORE

answered Jun 24 in Big Data Hadoop by Gitika
• 19,720 points
17 views
0 votes
1 answer

When creating a Hive table how can you specify the table creator name in Hive?

Hey, While creating a table the TBLPROPERTIES clause is used ...READ MORE

answered Jun 26 in Big Data Hadoop by Gitika
• 19,720 points
19 views
0 votes
1 answer

Hadoop Mapreduce word count Program

Firstly you need to understand the concept ...READ MORE

answered Mar 16, 2018 in Data Analytics by nitinrawat895
• 10,110 points
2,055 views
0 votes
1 answer

hadoop.mapred vs hadoop.mapreduce?

org.apache.hadoop.mapred is the Old API  org.apache.hadoop.mapreduce is the ...READ MORE

answered Mar 16, 2018 in Data Analytics by nitinrawat895
• 10,110 points
198 views
0 votes
10 answers

hadoop fs -put command?

copy command can be used to copy files ...READ MORE

answered Dec 7, 2018 in Big Data Hadoop by Sujay
10,515 views
0 votes
1 answer

Hadoop dfs -ls command?

In your case there is no difference ...READ MORE

answered Mar 16, 2018 in Big Data Hadoop by kurt_cobain
• 9,240 points
767 views
0 votes
1 answer

What is the command to know the details of your data created in a table in Hive?

Hey, Yes, there is a way to check ...READ MORE

answered May 14 in Big Data Hadoop by Gitika
• 19,720 points
68 views
0 votes
1 answer