gravitino.api.tag.tag.Tag

class gravitino.api.tag.tag.Tag

Bases: Auditable

The interface of a tag.

A tag is a label that can be attached to a catalog, schema, table, fileset, topic, or column. It can be used to categorize, classify, or annotate these objects.

__init__()

Methods

__init__()

associated_objects()

The associated objects of the tag.

audit_info()

comment()

Get the comment of the tag.

inherited()

Check if the tag is inherited from a parent object or not.

name()

Get the name of the tag.

properties()

Get the properties of the tag.

Attributes

PROPERTY_COLOR

A reserved property to specify the color of the tag.

PROPERTY_COLOR: ClassVar[str] = 'color'

A reserved property to specify the color of the tag. The color is a string of hex code that represents the color of the tag. The color is used to visually distinguish the tag from other tags.

associated_objects() AssociatedObjects

The associated objects of the tag.

Raises:

UnsupportedOperationException: The associated_objects method is not supported.

Returns:

AssociatedObjects: The associated objects of the tag.

abstract comment() str

Get the comment of the tag.

Returns:

str: The comment of the tag.

abstract inherited() bool | None

Check if the tag is inherited from a parent object or not.

If the tag is inherited, it will return True, if it is owned by the object itself, it will return False.

Note. The return value is optional, only when the tag is associated with an object, and called from the object, the return value will be present. Otherwise, it will be empty.

Returns:
Optional[bool]:

True if the tag is inherited, false if it is owned by the object itself. Empty if the tag is not associated with any object.

abstract name() str

Get the name of the tag.

Returns:

str: The name of the tag.

abstract properties() Dict[str, str]

Get the properties of the tag.

Returns:

Dict[str, str]: The properties of the tag.