gravitino.dto.rel.table_dto.TableDTO

class gravitino.dto.rel.table_dto.TableDTO(_name: str | None = None, _columns: list[gravitino.dto.rel.column_dto.ColumnDTO] | None = None, _audit: AuditDTO | None = None, _comment: str | None = None, _distribution: DistributionDTO | None = None, _sort_orders: list[gravitino.dto.rel.sort_order_dto.SortOrderDTO] | None = None, _partitioning: list[gravitino.dto.rel.partitioning.partitioning.Partitioning] | None = None, _indexes: list[gravitino.dto.rel.indexes.index_dto.IndexDTO] | None = None, _properties: dict[str, str] | None = None)

Bases: Table, DataClassJsonMixin

Represents a Table DTO (Data Transfer Object).

__init__(_name: str | None = None, _columns: list[gravitino.dto.rel.column_dto.ColumnDTO] | None = None, _audit: AuditDTO | None = None, _comment: str | None = None, _distribution: DistributionDTO | None = None, _sort_orders: list[gravitino.dto.rel.sort_order_dto.SortOrderDTO] | None = None, _partitioning: list[gravitino.dto.rel.partitioning.partitioning.Partitioning] | None = None, _indexes: list[gravitino.dto.rel.indexes.index_dto.IndexDTO] | None = None, _properties: dict[str, str] | None = None) None

Methods

__init__([_name, _columns, _audit, ...])

audit_info()

columns()

Gets the columns of the table.

comment()

Gets the comment of the table.

distribution()

Gets the bucketing of the table.

from_dict(kvs, *[, infer_missing])

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

index()

Gets the indexes of the table.

name()

Gets name of the table.

partitioning()

Gets the physical partitioning of the table.

properties()

Gets the properties of the table.

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

sort_order()

Gets the sort order of the table.

to_dict([encode_json])

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

Attributes

dataclass_json_config

columns() list[gravitino.dto.rel.column_dto.ColumnDTO]

Gets the columns of the table.

Returns:

list[Column]: The columns of the table.

comment() str | None

Gets the comment of the table.

Returns:
str (optional):

The comment of the table. None is returned if no comment is set.

distribution() Distribution | None

Gets the bucketing of the table.

Returns:
Distribution:

The bucketing of the table. If no bucketing is specified, Distribution.NONE is returned.

index() list[gravitino.api.rel.indexes.index.Index] | None

Gets the indexes of the table.

Returns:
list[Index]:

The indexes of the table. If no indexes are specified, Indexes.EMPTY_INDEXES is returned.

name() str

Gets name of the table.

Returns:

str: Name of the table.

partitioning() list[gravitino.api.rel.expressions.transforms.transform.Transform] | None

Gets the physical partitioning of the table.

Returns:

list[Transform]: The physical partitioning of the table.

properties() dict[str, str] | None

Gets the properties of the table.

Returns:
dict[str, str]:

The properties of the table. Empty dictionary is returned if no properties are set.

sort_order() list[gravitino.dto.rel.sort_order_dto.SortOrderDTO] | None

Gets the sort order of the table.

Returns:
list[SortOrder]:

The sort order of the table. If no sort order is specified, an empty list is returned.