Skip to main content

Lineage, classification, and search
to govern the platform's data.

Atlas catalogs the data assets of the Hadoop ecosystem, shows where each piece of data has been, and classifies it, so that access follows those classifications. Follow a Hive table into the catalog and see the classification follow the table through the lineage.

Apache Atlas catalogs the platform's data assets: it models each one as an entity of a type, links the entities through lineage, and tags them with classifications that Ranger uses to govern access.

Catalog

Types and entities

Metadata is modeled as types and stored as entities, with attributes and relationships between them. Ready-made types exist for Hive, HBase, Sqoop, and Kafka, and new types can be defined.

Lineage

Where it comes from, where it goes

Atlas records how data moves through processes and shows the path in a visual interface, with lineage also available through REST.

Classification

Tags that follow the data

Classifications such as PII tag entities and propagate through the lineage. Ranger uses them in access and masking policies.

On this page

See a table reach Atlas​

The most common path: the hook notifies Atlas through Kafka as soon as the table is created. Press Play or move forward step by step. Underlined names lead to the Glossary.

HiveWhere the metadata originates
HiveCreates the table from a query
HookRegistered with Hive
KafkaMessages between the two sides
ATLAS_HOOKNotifications sent to Atlas
ATLAS_ENTITIESChanges that Atlas publishes
AtlasModels and writes
Type SystemModels the metadata as types and entities
Graph EngineWrites the graph and creates the indexes
StorageWhere Atlas stores
HBaseThe metadata
SolrThe indexes
Step 1 of 6

1 Hive creates a table

A table is created in Hive from a query, a create table as select. The hook, registered with Hive, listens for create, update, and delete operations and learns about the new table.

  1. Hive creates a table. A table is created in Hive from a query, a create table as select. The hook, registered with Hive, listens for create, update, and delete operations and learns about the new table.
  2. The hook notifies through Kafka. The hook does not call Atlas directly: it publishes a notification to the Kafka ATLAS_HOOK topic, with the operation, such as ENTITY_CREATE, and the entities it creates.
  3. Atlas reads the message and applies the model. Atlas consumes the topic and uses the Type System: the table becomes an entity of type hive_table, and the columns become entities of type hive_column. Because the table originated from a query, a process links the source tables to the new one, and this link is what forms the lineage.
  4. The Graph Engine writes. The Graph Engine translates types and entities into the graph and writes it with JanusGraph. In TDP Datacenter, the metadata is stored in HBase, and the indexes, which make search efficient, in Solr.
  5. Atlas publishes the change. Atlas notifies the change, ENTITY_CREATE, on the Kafka ATLAS_ENTITIES topic, and consumers, such as Ranger, can react to it.
  6. The table enters the catalog. The entity can now be queried through the Admin UI search, the DSL, and the REST API, and its lineage can be viewed in the interface.
Figure 1 - From the Hive table to the catalog. The hook reports the creation through the Kafka ATLAS_HOOK topic. Atlas consumes the message, models the table as entities, writes the graph and the indexes, and publishes the change to ATLAS_ENTITIES.

Architecture​

Sources and applications talk to Atlas through the integration layer, the core models and writes, and storage holds the graph and the indexes.

Apache Atlas architecture: metadata sources, apps, integration, core and storageThe metadata sources (HBase, Hive, Sqoop and Kafka) send metadata to the messages via Kafka, in the integration layer. The integration has two interfaces: the messages via Kafka, which exchange events with the core and feed the Ranger tag-based policies, and the HTTP/REST API, which exchanges data in both directions with the Admin UI and with the core. The core brings together ingest/export, the Type System and the Graph Engine on top of JanusGraph, which writes the metadata to HBase and the indexes to Solr.Metadata SourcesHBaseHiveSqoopKafkaAppsRangertag-basedpoliciesAdminUIIntegrationMessagesKafkaAPIHTTP/RESTCoreIngest/ExportType SystemGraph EngineJanusGraphMetadataStorageHBaseIndexStorageSolr
Figure 2 - Atlas architecture: metadata sources, applications, integration through messaging and API, core on top of JanusGraph, and storage for metadata and indexes. Underlined terms lead to the Glossary.

What the figure shows:

  1. The metadata sources, HBase, Hive, Sqoop, and Kafka, have models defined in Atlas itself and hooks that ingest their objects, in real time or in batch. Besides the hooks, an import utility brings in all at once the tables that already existed in Hive.
  2. Ranger consumes the change notifications for tag-based policies.
  3. The Admin UI uses the REST API.
  4. Messaging through Kafka is a more loosely coupled integration that favors scalability and reliability.
  5. The REST API exposes all Atlas functions, and any application can create entities through it.
  6. The core brings together the Type System, the Graph Engine, and metadata ingest and export. The Graph Engine writes the graph with JanusGraph.
  7. Metadata storage: in TDP Datacenter, the metadata is kept in HBase.
  8. Index storage: in TDP Datacenter, the indexes, which make search efficient, are kept in Solr.

Types and attributes​

From the most general to the most concrete: each level contains the next. The example is the hive_table type, which already comes defined in Atlas.

Level 1 of 3

Metatype

The category a type belongs to: primitive, enum, collection, or composite. Entities, classifications, structs, and relationships are composite types.

  1. Metatype. The category a type belongs to: primitive, enum, collection, or composite. Entities, classifications, structs, and relationships are composite types.
  2. Type. The definition of a metadata object, with a unique name. hive_table, for example, is an entity type that extends DataSet and declares the attributes of a Hive table. All metadata that Atlas manages, such as Hive tables, is modeled as a type.
    • Supertype. The type from which another inherits attributes, and a type can inherit from more than one. Hive and HBase tables extend DataSet.
    • Entity. The instance of an entity type: a real Hive table, such as customers, is an entity of type hive_table. It has a value for each attribute and a GUID, generated by the server and constant throughout the entity's life.
    • Classification. One of the composite metatypes: it defines a tag, such as PII, which can have attributes and be associated with many entities.
  3. Attribute. Each composite type declares attributes, with a name and a type, and states whether the value is optional, indexable, or unique and what the cardinality is. The db attribute of hive_table, for example, references a hive_db, and this is how Atlas relates the table to the database.
    • qualifiedName. The unique attribute Atlas uses to identify entities, such as those from Hive, to create and update them without duplicating.
Figure 3 - The levels of the Atlas metadata model. The terms beside each level go with that level.

The name of an entity​

The hook creates and updates Hive entities without duplicating them because each one has a unique name. In the example, a column of a table.

Click each part of the name.

Database

The name of the Hive database. The qualifiedName of the database itself has only two parts: the database and the cluster.

See in the Glossary
sales — Database
The name of the Hive database. The qualifiedName of the database itself has only two parts: the database and the cluster.
.customers — Table
The name of the table. The qualifiedName of the table is the database, the dot, the table, the at sign, and the cluster.
.email — Column
The name of the column, which only enters the qualifiedName of a hive_column entity. Database, table, and column are in lowercase.
@primary — Cluster
The name of the cluster, which enters the qualifiedName of all entities and is configurable in Ambari at atlas.cluster.name.

The qualified name answers who the entity is in the real world and serves as the key to create and update it.

The GUID, in turn, is generated by the Atlas server when the entity is created and does not change throughout its life.

A classification through the lineage​

Classifying a source table is enough: derived tables inherit the tag, and Ranger turns it into an access policy.

DataLineage entities
Source tableClassified entity
Derived tableCreated from the source
AtlasClassifies and links
ClassificationPII, for example
ProcessLinks the source to the derived table
KafkaNotifications
ATLAS_ENTITIESChanges that Atlas publishes
RangerApplies the classification
TagSyncBrings the classifications as tags
Tag-based policyApplies to every resource with the classification
Step 1 of 7

1 The source is classified

A classification, such as PII, is associated with the entity of the source table. The association carries a propagation flag, which starts enabled.

  1. The source is classified. A classification, such as PII, is associated with the entity of the source table. The association carries a propagation flag, which starts enabled.
  2. The lineage shows what derives from it. The process that created the derived table, for example a create table as select, links the source to the derived table. This lineage path is what the classification travels.
  3. The classification propagates. The derived table now has the same classification, and the same applies to everything that derives from it further downstream. Updating or removing the classification on the source updates or removes it on the derived tables.
  4. A new table is born classified. When a view is created from a classified table, it receives the source's classifications at the moment the lineage is recorded.
  5. Propagation can be contained. The association flag and the lineage edge flag turn propagation off, and the edge can block only some classifications. This is useful, for example, when a column classified as PII is masked when the view is created.
  6. Atlas notifies each change. For each affected entity, Atlas publishes a notification, such as CLASSIFICATION_ADD, to the Kafka ATLAS_ENTITIES topic.
  7. Ranger starts enforcing. TagSync reads the topic and carries the classifications to Ranger as tags. A tag-based policy then applies to every resource that has that classification.
Figure 4 - Propagation of a classification. The classification of the source table follows the process to the derived tables. Atlas notifies each change on ATLAS_ENTITIES, and TagSync carries the classification to Ranger.

Why Atlas​

Catalog

Ready-made and new types

Predefined types for Hadoop and non-Hadoop metadata, and the ability to define new types, with simple and complex attributes, references, and inheritance.

Lineage

The path of the data

An intuitive interface to see the lineage of the data as it moves through processes, and REST APIs to access and update it.

Classification

Dynamic tags

Dynamically created classifications, such as PII, EXPIRES_ON, DATA_QUALITY, or SENSITIVE, with their own attributes. An entity can have several, and they follow the data through the lineage.

Search

By type, tag, or text

Search by type, classification, attribute value, or free text, REST APIs for complex criteria, and an SQL-like language, the DSL.

Security

Fine-grained control and masking

Fine-grained control over access to metadata and over classification operations. With Ranger, authorization and masking on data access follow the entities' classifications.

Vocabulary

The business glossary

The glossary relates business terms, organizes them into categories, and links them to assets, so that data can be worked with in the most familiar vocabulary.

In the TDP editions​

Available in the TDP editions
EditionVersionDocumentation
TDP Datacenter2.3.0TDP Datacenter components

In TDP Datacenter​

In TDP Datacenter, Atlas is the ATLAS service, installed and managed by Ambari.

Service components

ATLAS_CLIENT (client, one or more) and ATLAS_SERVER (master, one or more). The ATLAS_SERVER requires INFRA_SOLR_CLIENT (Infra Solr), HBASE_CLIENT (HBase), HDFS_CLIENT (HDFS) and KAFKA_BROKER (Kafka). Component category.

Storage

Metadata is stored in HBase, in a table configurable at atlas.graph.storage.hbase.table, and the indexes in Solr, configurable at atlas.graph.index.search.backend and atlas.graph.index.search.solr.mode. The number of shards and the replication factor of the Atlas collections are configurable at atlas_solr_shards and atlas_solr_replication_factor (atlas-env).

Messaging

The Kafka brokers are configurable at atlas.kafka.bootstrap.servers, the topics at atlas.notification.topics, and the consumer group of the hook topic at atlas.kafka.hook.group.id.

Dependencies

Ambari requires in the cluster Kafka.

Lineage

Sending metadata to Atlas can be enabled in Hive, at hive.atlas.hook (hive-env), in HBase, at hbase.atlas.hook (hbase-env), and in Sqoop, at sqoop.atlas.hook (sqoop-env). Airflow reaches Atlas through airflow-atlas-site, configured with host and port, and NiFi through the ReportLineageToAtlas component.

Authentication

File, LDAP, and Kerberos authentication can be enabled at atlas.authentication.method.file, atlas.authentication.method.ldap, and atlas.authentication.method.kerberos. Single sign-on through Knox can be enabled at atlas.sso.knox.enabled, and TLS at atlas.enableTLS.

Authorization

The Ranger plugin can be enabled at ranger-atlas-plugin-enabled, and the Atlas authorizer is configurable at atlas.authorizer.impl. Classifications reach Ranger through TagSync, with Atlas as a source that can be enabled at ranger.tagsync.source.atlas (ranger-tagsync-site). See Security in TDP Datacenter.

Catalog

OpenMetadata can include Atlas among the catalog services, which can be enabled at atlas.enabled (openmetadata_integration).

Next steps​

Sources​

Apache Atlas
Apache Atlas - Architecture
Apache Atlas - Type System
Apache Atlas - Notifications
Apache Atlas - Classification Propagation