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
414 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,870 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,170 points
294 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,870 points
630 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, 2019 in Big Data Hadoop by Gitika
• 65,870 points
167 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
7,243 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,176 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
53,160 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
2,745 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, 2019 in Big Data Hadoop by Gitika
• 65,870 points
599 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,870 points
1,667 views