Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

...

Hive Views

...

Table of Contents

Use Cases

Views (http://issues.apache.org/jira/browse/HIVE-972Image Removed) are a standard DBMS feature and their uses are well understood. A typical use case might be to create an interface layer with a consistent entity/attribute naming scheme on top of an existing set of inconsistently named tables, without having to cause disruption due to direct modification of the tables. More advanced use cases would involve predefined filters, joins, aggregations, etc for simplifying query construction by end users, as well as sharing common definitions within ETL pipelines.

...

  • add queryable view support at the SQL language level (specifics of the scoping are under discussion in the Issues section below)
  • make sure views and their definitions show up anywhere tables can currently be enumerated/searched/described
  • where relevant, provide additional metadata to allow views to be distinguished from tables

...

  • tables: this is mandatory if we want DROP TABLE to be able to correctly CASCADE/RESTRICT to a referencing view
  • other views: same as tables
  • columns: this is optional (useful for lineage inspection, but not required for implementing SQL features)
  • temporary functions: we should disallow these at view creation unless we also want a concept of temporary view (or if it's OK for the referencing view to become invalid whenever the volatile function registry gets cleared)
  • any other objects? (e.g. udt's coming in as part of http://issues.apache.org/jira/browse/HIVE-779Image Removed)

(Note that MySQL doesn't actually implement CASCADE/RESTRICT: it just ignores the keyword and drops the table unconditionally, leaving the view dangling.)

...

Update 1-Feb-2011: For the latest on this, see Hive- PartitionedViews.

Metastore Upgrades

Since we are adding new columns to the TBLS table in the metastore schema, existing metastore deployments will need to be upgraded. There are two ways this can happen.

...