What is CLUSTER BY keyword and when can we use this keyword in hive

0 votes

Hi,

Can anyone explain what CLUSTER BY keyword does and why we use this?

May 16, 2019 by anonymous

edited May 16, 2019 by Gitika 212 views

1 answer to this question.

0 votes

Hey,

Cluster BY clause used on tables present in Hive. Hive uses the columns in Cluster by to distribute the rows among reducers. It ensures sorting orders of values present in multiple reducers.

Query you can use:

SELECT  Id, Name from table_name CLUSTER BY Id;

Cluster By clause mentioned on the Id column name of the table table_name, The output when executing this query will give results to multiple reducers. So if we want to store results into multiple reducers, we go with Cluster By.

answered May 16, 2019 by Gitika
• 65,730 points

Related Questions

0 votes
1 answer
0 votes
0 answers

What is meant by "An Object" when we use Str() Function in R

Everyone agrees that str() reveals an object's ...READ MORE

Jun 23, 2022 in Data Analytics by avinash
• 1,840 points
597 views
0 votes
2 answers

What is the use of toString method in Java and how can I use it ?

Whenever you require to explore the constructor ...READ MORE

answered Aug 23, 2018 in Java by Daisy
• 8,140 points
4,611 views
0 votes
2 answers

What is the use of @Override annotation in Java ? When do we use it ?

@Override annotation is used when we override ...READ MORE

answered Aug 14, 2019 in Java by Sirajul
• 59,190 points
4,080 views
–1 vote
0 answers
+2 votes
1 answer

what is naming convention in uipath..? why and where we use naming convention..?

Hey, it is recommend to write variable names in Camel ...READ MORE

answered Aug 13, 2019 in RPA by Abha
• 28,140 points
2,032 views
0 votes
1 answer

Can you explain what is the use _init_ and self in python?

Hi, The basic difference between these two are _init_ ...READ MORE

answered Aug 14, 2019 in Python by anonymous
1,799 views
0 votes
2 answers

what is Arguement and why we use aruement in uipath

Hey Teja, Arguments are just like Variables, they are ...READ MORE

answered Aug 19, 2019 in RPA by Abha
• 28,140 points
5,101 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP