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, 2019 in Big Data Hadoop by daina
507 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, 2019 by Gitika
• 65,970 points

Related Questions In Big Data Hadoop

0 votes
0 answers

What is the difference between partitioning and bucketing a table in Hive ?

Hi Team, I am new to Hive. I ...READ MORE

Dec 20, 2020 in Big Data Hadoop by akhtar
• 38,210 points
609 views
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, 2019 in Big Data Hadoop by Gitika
• 65,970 points
772 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 25, 2019 in Big Data Hadoop by Gitika
• 65,970 points
213 views
0 votes
1 answer
+1 vote
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
• 11,380 points
8,027 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
• 11,380 points
1,366 views
+2 votes
11 answers

hadoop fs -put command?

Hi, You can create one directory in HDFS ...READ MORE

answered Mar 16, 2018 in Big Data Hadoop by nitinrawat895
• 11,380 points
66,682 views
–1 vote
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,390 points
3,057 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 15, 2019 in Big Data Hadoop by Gitika
• 65,970 points
731 views
0 votes
1 answer

What is the significance of ‘IF EXISTS” clause while dropping a table in Hive?

Hi, Since the table being dropped does not ...READ MORE

answered Jun 26, 2019 in Big Data Hadoop by Gitika
• 65,970 points
1,926 views