Data Governance
Also available as:
loading table of contents...

Atlas Entities

In Atlas, an "entity" is a specific value or instance of a type, and thus represents a specific metadata object. Using the object-oriented programming language analogy, an instance (entity) is an object of a particular class (type).


In the Atlas UI, entities are sometimes referred to as "assets".

An example of an entity is a specific Hive table. Consider a Hive "customers" table in the "default" Hive database. In Atlas this table is an entity of the type hive_table. As an instance of a class type, it has values for all of the hive_table type attributes. For example:

guid: "9ba387dd-fa76-429c-b791-ffc338d3c91f"
typeName: “hive_table”
	name: “customers”	
	db: "b42c6cfc-c1e7-42fd-a9e6-890e0adf33bc"
	owner: “admin”
	createTime: "2016-06-20T06:13:28.000Z"
	lastAccessTime: "2016-06-20T06:13:28.000Z" 
	comment: null 
	retention: 0 
	sd: "ff58025f-6854-4195-9f75-3a3058dd8dcf"
	partitionKeys: null 
	aliases: null 
	columns: ["65e2204f-6a23-4130-934a-9679af6a211f", "d726de70-faca-46fb-9c99-cf04f6b579a6", ...] 
	parameters: {"transient_lastDdlTime": "1466403208"}
	viewOriginalText: null 
	viewExpandedText: null 
	tableType: “MANAGED_TABLE” 
	temporary: false

This example helps illustrate the following points:

  • Every entity that is an instance of a class type is identified by a unique identifier, referred to as a GUID. This GUID is generated by the Atlas server when the object is defined, and remains constant for the entire lifetime of the entity. Each entity can be accessed by referencing its GUID.

    In this example, the "customers" table in the default database is uniquely identified by the GUID "9ba387dd-fa76-429c-b791-ffc338d3c91f".

  • An entity is of a given type, and the name of the type is provided with the entity definition.

    In this example, the "customers" table is a hive_table.

  • The values of this entity are a map of all of the attribute names and values for attributes that are defined in the hive_table type definition.

  • Attribute values follow the metatype of the attribute.

    • Primitive types – Integer, string, or boolean values. For example:

      • name: “customers”

      • temporary: false

    • Collection metatypes – An array or map of values of the contained metatype. For example:

      parameters: {"transient_lastDdlTime": "1466403208"}

    • Composite metatypes – For Entities, the value is an entity with which this particular entity will have a relationship.

      For example, the Hive “customers” table is present in the "default" database. The relationship between the table and database are captured via the db attribute. Therefore, the value of the db attribute is a GUID that uniquely identifies the hive_db "default" entity.

We can now see the difference between Entity and Struct metatypes. Entities and Structs both compose attributes of other types. However, entities of Class types have the guid attribute, and can be referenced from other entities (such as a hive_db entity that is referenced from a hive_table entity). Instances of Struct types do not have an identity of their own. The value of a Struct type is a collection of attributes that are "embedded" inside the entity itself.