With Impala, you work with schema objects that are familiar to database users: primarily databases, tables, views, and functions. The SQL syntax to work with these objects is explained in Impala SQL Statements. This section explains the conceptual knowledge you need to work with these objects and the various ways to specify their names.
Within a table, partitions can also be considered a kind of object. Partitioning is an important subject for Impala, with its own documentation section covering use cases and performance considerations. See Partitioning for Impala Tables for details.
Impala does not have a counterpart of the "tablespace" notion from some database systems. By default, all the data files for a database, table, or partition are located within nested folders within the HDFS file system. You can also specify a particular HDFS location for a given Impala table or partition. The raw data for these objects is represented as a collection of data files, providing the flexibility to load data by simply moving files into the expected HDFS location.
Information about the schema objects is held in the
metastore database. This database is shared between
Impala and Hive, allowing each to create, drop, and query each other's databases, tables, and so on. When
Impala makes a change to schema objects through a CREATE
, ALTER
,
DROP
, INSERT
, or LOAD DATA
statement, it broadcasts those
changes to all nodes in the cluster through the catalog
service. When you make such changes through Hive or directly through manipulating HDFS files, you use
the REFRESH or
INVALIDATE METADATA statements on the
Impala side to recognize the newly loaded data, new tables, and so on.