February 2015
Beginner to intermediate
208 pages
4h 15m
English
In Hive, views are logical data structures that can be used to simplify queries by either hiding the complexities such as joins, subqueries, and filters or by flatting the data. Unlike some RDBMS, Hive views do not store data or get materialized. Once the Hive view is created, its schema is frozen immediately. Subsequent changes to the underlying tables (for example, adding a column) will not be reflected in the view's schema. If an underlying table is dropped or changed, subsequent attempts to query the invalid view will fail, as follows:
jdbc:hive2://> CREATE VIEW employee_skills . . . . . . .> AS . . . . . . .> SELECT name, skills_score['DB'] AS DB, . . . . . . .> skills_score['Perl'] AS Perl, . . . . . . .> skills_score['Python'] ...
Read now
Unlock full access