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
- Architecture
- Types and attributes
- The name of an entity
- A classification through the lineage
- Why Atlas
- In the TDP editions
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.
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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
Architecture
Sources and applications talk to Atlas through the integration layer, the core models and writes, and storage holds the graph and the indexes.
What the figure shows:
- 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.
- Ranger consumes the change notifications for tag-based policies.
- The Admin UI uses the REST API.
- Messaging through Kafka is a more loosely coupled integration that favors scalability and reliability.
- The REST API exposes all Atlas functions, and any application can create entities through it.
- The core brings together the Type System, the Graph Engine, and metadata ingest and export. The Graph Engine writes the graph with JanusGraph.
- Metadata storage: in TDP Datacenter, the metadata is kept in HBase.
- 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.
- Metatype. The category a type belongs to: primitive, enum, collection, or composite. Entities, classifications, structs, and relationships are composite types.
- 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.
- 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.
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 Glossarysales— 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.
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.
In the Glossary: Classification
- 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.
- 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.
- 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.
- 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.
- 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.
- Atlas notifies each change. For each affected entity, Atlas publishes a notification, such as CLASSIFICATION_ADD, to the Kafka ATLAS_ENTITIES topic.
- 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.
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
| Edition | Version | Documentation |
|---|---|---|
| TDP Datacenter | 2.3.0 | TDP Datacenter components |
In TDP Datacenter
In TDP Datacenter, Atlas is the ATLAS service, installed and managed by Ambari.
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.
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).
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.
Ambari requires in the cluster Kafka.
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.
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.
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.
OpenMetadata can include Atlas among the catalog services, which can be enabled at atlas.enabled (openmetadata_integration).
Next steps
TDP Datacenter
TDP Datacenter Architecture
The services of the cluster managed by Ambari and how they relate.
Sources
Apache Atlas
Apache Atlas - Architecture
Apache Atlas - Type System
Apache Atlas - Notifications
Apache Atlas - Classification Propagation