InterviewSolution
Saved Bookmarks
| 1. |
What do you mean by Skewed tables in Hive? |
|
Answer» In Hive, there are some special types of tables in which the VALUES of columns appear in a repeating manner (Skew), these tables are called as skewed tables. In Hive, while creation of a particular table we can specify that table as SKEWED. All the skewed values in the table are written into separate files and the REST of the remaining values are stored in another file. While writing QUERIES, skewed tables help to provide better performance. Syntax to define a particular table as ‘skewed’ during its creation is as written below using an example. CREATE TABLE TableName (column1 STRING, column2 STRING) SKEWED BY (column1) on (‘value’) |
|