gravitino.dto.metadata_object_dto.MetadataObjectDTO

class gravitino.dto.metadata_object_dto.MetadataObjectDTO(_type: Type, _full_name: str)

Bases: MetadataObject

Represents a Metadata Object DTO (Data Transfer Object).

__init__(_type: Type, _full_name: str) None

Methods

__init__(_type, _full_name)

builder()

from_dict(kvs, *[, infer_missing])

from_json(s, *[, parse_float, parse_int, ...])

full_name()

The full name of the object.

name()

The name of the object.

parent()

The parent full name of the object.

schema(*[, infer_missing, only, exclude, ...])

set_full_name(full_name)

Sets the full name of the metadata object.

to_dict([encode_json])

to_json(*[, skipkeys, ensure_ascii, ...])

type()

The type of the object.

class Type(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)

Bases: Enum

The type of object in the Gravitino system. Every type will map one kind of the entity of the underlying system.

CATALOG = 'catalog'

A catalog is a collection of metadata from a specific metadata source, like Apache Hive catalog, Apache Iceberg catalog, JDBC catalog, etc.

COLUMN = 'column'

A column is a sub-collection of the table that represents a group of same type data.

FILESET = 'fileset'

A fileset is mapped to a directory on a file system like HDFS, S3, ADLS, GCS, etc.

JOB = 'job'

A job represents a data processing task in Gravitino.

JOB_TEMPLATE = 'job_template'

A job template represents a reusable template for creating jobs in Gravitino.

METALAKE = 'metalake'

A metalake is a concept of tenant. It means an organization. A metalake contains many data sources.

MODEL = 'model'

A model is mapped to the model artifact in ML.

POLICY = 'policy'

A policy can be associated with a metadata object for data governance and similar purposes.

ROLE = 'role'

A role is an object contains specific securable objects with privileges.

SCHEMA = 'schema'

“A schema is a sub collection of the catalog. The schema can contain filesets, tables, topics, etc.

TABLE = 'table'

A table is mapped the table of relational data sources like Apache Hive, MySQL, etc.

TAG = 'tag'

A tag is used to help manage other metadata object.

TOPIC = 'topic'

A topic is mapped the topic of messaging data sources like Apache Kafka, Apache Pulsar, etc.

full_name() str

The full name of the object.

Full name will be separated by “.” to represent a string identifier of the object, like catalog, catalog.table, etc.

Returns:

str: The name of the object.

name() str

The name of the object.

Returns:

str: The name of the object.

parent() str | None

The parent full name of the object.

If the object doesn’t have parent, this method will return None.

Returns:

Optional[str]: The parent full name of the object.

set_full_name(full_name: str) None

Sets the full name of the metadata object.

Args:

full_name (str): The full name of the metadata object.

type() Type

The type of the object.

Returns:

Type: The type of the object.