HiveServer actions that produce Atlas entities
HiveServer operations that create or change Hive metadata, or that move data between tables, produce Atlas entities. Queries that only read data produce none.
The following table lists the HiveServer operations that produce or update metadata in Atlas through the Atlas hook for HiveServer.
| HiveServer operation | Entities from the Atlas hook for HiveServer |
|---|---|
CREATE DATABASE
|
hive_db_ddl |
CREATE TABLE
|
hive_table_ddl For an external table or a table that uses the
HBase storage handler, also hive_process and
hive_process_execution. |
CREATE TABLE AS SELECT,
CREATE VIEW,
ALTER VIEW AS SELECT,
CREATE MATERIALIZED VIEW
|
hive_process, hive_process_execution,
hive_column_lineage, hive_table_ddl |
INSERT INTO ... SELECT,
INSERT OVERWRITE |
hive_process,
hive_process_execution, hive_column_lineage |
LOAD DATA,
EXPORT,
IMPORT |
hive_process,
hive_process_execution |
MERGE |
hive_process,
hive_process_execution, hive_column_lineage |
ALTER TABLE ... RENAME TO,
ALTER VIEW ... RENAME TO |
hive_table_ddl |
ALTER TABLE ... ADD COLUMNS,
ALTER TABLE ... REPLACE COLUMNS,
ALTER TABLE ... CHANGE COLUMN,
ALTER TABLE ... CLUSTERED BY,
ALTER TABLE ... SET FILEFORMAT,
ALTER TABLE ... SET LOCATION,
ALTER TABLE ... SET SERDE,
ALTER TABLE ... SET SERDEPROPERTIES,
ALTER TABLE ... SET TBLPROPERTIES,
ALTER TABLE ... UNSET TBLPROPERTIES,
ALTER VIEW ... SET TBLPROPERTIES,
ALTER VIEW ... UNSET TBLPROPERTIES |
hive_table_ddl. For an external table or a table that uses the HBase storage
handler, also hive_process and
hive_process_execution. For SET LOCATION, Atlas
adds the execution to the process that the CREATE TABLE statement created and does
not create a new process. |
ALTER DATABASE ... SET DBPROPERTIES |
hive_db_ddl |
ALTER TABLE ... ADD PARTITION,
ALTER TABLE ... DROP PARTITION,
ANALYZE TABLE ... COMPUTE STATISTICS,
ALTER DATABASE ... SET OWNER,
DROP DATABASE,
DROP TABLE,
DROP VIEW |
None.
For the DROP statements, Atlas deletes the existing entities through the Atlas hook for HMS. When a database or
a table is dropped, Atlas also sets its DDL entities to DELETED. For an external table, the process and process
execution entities and the path entities stay ACTIVE. For ALTER DATABASE ... SET OWNER, the Atlas
hook for HMS updates only the owner of the database. The partition and statistics statements do not change any
entity. |
The Atlas hook for HMS creates, updates, and deletes the hive_db,
hive_table, hive_column, and
hive_storagedesc entities for these operations. The inputs and outputs of
a process can also include file system path entities, such as hdfs_path.
Notable actions in HiveServer that do NOT produce process or process execution entities in Atlas, meaning that no lineage is produced for these operations:
- SELECT
- Plain
UPDATEandDELETEstatements. AMERGEstatement does produce a process. - Operations on temporary tables, except CREATE TEMPORARY EXTERNAL TABLE, and statements that read from a temporary table
