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.