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

Atlas Types

In Atlas, a "type" is a definition of how a particular type of metadata object is stored and accessed. A type represents one or more attributes that define the properties for the metadata object. Users with a development background will recognize the similarity of a type to Entities used in object-oriented programming languages, or a table schema in a relational database.

An example of a type that is natively defined within Atlas is a Hive table. A Hive table is defined with the following attributes:

Name: hive_table
MetaType: Entity
SuperTypes: DataSet
	name: String (name of the table)
	db: Database object of type hive_db
	owner: String
	createTime: Date
	lastAccessTime: Date 
	comment: String 
	retention: int 
	sd: Storage Description object of type hive_storagedesc 
	partitionKeys: Array of objects of type hive_column 
	aliases: Array of strings 
	columns: Array of objects of type hive_column 
	parameters: Map of String keys to String values 
	viewOriginalText: String 
	viewExpandedText: String 
	tableType: String 
	temporary: Boolean

This example helps illustrate the following points:

  • An Atlas type is identified uniquely by a name.

  • A type has a metatype. A metatype represents the type of a model in Atlas. Atlas contains the following metatypes:

    • Primitive types – Int, String, Boolean, etc.

    • Enum types

    • Collection types – Array, Map

    • Composite types – Entity, Struct, Classification/Classification

  • A type can "extend" from a parent "superType", and therefore inherits the super type attributes. This allows modellers to define common attributes across a set of related types. This is similar to Entities inheriting properties of super Entities in object-oriented programming.

    In this example, every hive table extends from a pre-defined "DataSet" super type. More details about pre-defined types will be provided in subsequent sections.

    It is also possible for an Atlas type to extend from multiple super types.

  • Entity, Struct, or Classification/Classification types can have a collection of attributes. Each attribute has a name along with other associated properties. A property can be referred to using the format type_name.attribute_name. You should also note that attributes themselves are defined using Atlas metatypes. The difference between Entities and Structs is explained in the context of Entities in the next section. Classifications will be discussed in the “Cataloging Metadata in Atlas” section.

    In this example, is a String, hive_table.aliases is an array of Strings, hive_table.db refers to an instance of a type named hive_db, and so on.

  • You can use type references in attributes (such as hive_table.db) to define arbitrary relationships between two types defined in Atlas, which enables you to build rich models. You can also collect a list of references as an attribute type (for example, hive_table.cols, which represents a list of references from hive_table to the hive_column type).