HiveServer lineage

Atlas collects metadata from HiveServer queries to show how data flows between Hive tables, views, and columns.

The Atlas lineage graph shows the input and output processes that the current entity participated in, specifically those relationships modeled as inputToProcesses and outputFromProcesses. Entities are included if they were inputs to processes that lead to the current entity or they are output from processes for which the current entity was an input. HiveServer processes follow this pattern.

To view the lineage of an entity, open the entity details page and select the Lineage tab.

Figure 1. Hive table lineage in the New User Interface

Lineage tab of the passenger_revenue hive_table entity in the New User Interface. The bookings and passengers tables feed a Hive process, which produces the passenger_revenue table. The passenger_revenue table feeds two further Hive processes. One process writes to the loyalty_report table. The other process produces the v_top_passengers view.

The Lineage tab of the passenger_revenue hive_table entity in the New User Interface. The bookings and passengers tables feed the process of the CREATE TABLE AS SELECT statement that created passenger_revenue. The table then feeds the process of an INSERT ... SELECT statement, which writes to the loyalty_report table, and the process of the CREATE VIEW statement that created the v_top_passengers view.

Figure 2. Hive table lineage in the Classic User Interface

Lineage tab of the passenger_revenue hive_table entity in the Classic User Interface. The passengers and bookings tables feed a Hive process, which produces the passenger_revenue table. The passenger_revenue table feeds two further Hive processes. One process produces the v_top_passengers view. The other process writes to the loyalty_report table.

The Lineage tab of the passenger_revenue hive_table entity in the Classic User Interface. The passengers and bookings tables feed the process of the CREATE TABLE AS SELECT statement that created passenger_revenue. The table then feeds the process of the CREATE VIEW statement that created the v_top_passengers view and the process of an INSERT ... SELECT statement, which writes to the loyalty_report table.

The lineage graph shows the name of each Hive process, which the UI truncates. A process that comes from a CREATE TABLE AS SELECT or CREATE VIEW statement is named after the table or view that the statement creates. A process that comes from an INSERT ... SELECT statement starts with QUERY:. For the complete name format, see Hive Process.

The following operations do not produce lineage:

  • SELECT queries that do not write data.
  • Plain UPDATE and DELETE statements.
  • Operations on temporary tables, except CREATE TEMPORARY EXTERNAL TABLE, and statements that read from a temporary table, unless the HiveServer hook is configured to include them.

Column lineage

When a query writes to a table or creates a table or view, Atlas also records the lineage of the output columns. Open the Lineage tab of a column to see which source columns contribute to it and which columns it contributes to.

Figure 3. Hive column lineage in the New User Interface

Lineage tab of the total_fare_usd hive_column entity in the New User Interface. The fare_usd column feeds a column lineage node, which produces the total_fare_usd column. The total_fare_usd column feeds two further column lineage nodes. Each node produces a column that is also named total_fare_usd.

The Lineage tab of the total_fare_usd hive_column entity in the New User Interface. The fare_usd column feeds the total_fare_usd column. The column also feeds the columns of the same name in the table that the INSERT ... SELECT statement writes to and in the view.

Figure 4. Hive column lineage in the Classic User Interface

Lineage tab of the total_fare_usd hive_column entity in the Classic User Interface. The fare_usd column feeds a column lineage node, which produces the total_fare_usd column. The total_fare_usd column feeds two further column lineage nodes. Each node produces a column that is also named total_fare_usd.

The Lineage tab of the total_fare_usd hive_column entity in the Classic User Interface. The fare_usd column feeds the total_fare_usd column. The column also feeds the columns of the same name in the table that the INSERT ... SELECT statement writes to and in the view.