gravitino.name_identifier.NameIdentifier¶
- class gravitino.name_identifier.NameIdentifier(_name: str, _namespace: Namespace)¶
Bases:
DataClassJsonMixinA name identifier is a sequence of names separated by dots. It’s used to identify a metalake, a catalog, a schema or a table. For example, “metalake1” can represent a metalake, “metalake1.catalog1” can represent a catalog, “metalake1.catalog1.schema1” can represent a schema.
Methods
__init__(_name, _namespace)builder(namespace, name)check(condition, message, *args)Check the given condition is true.
from_dict(kvs, *[, infer_missing])from_json(s, *[, parse_float, parse_int, ...])get_name()Get the name of the NameIdentifier.
Get the namespace of the NameIdentifier.
Check if the NameIdentifier has a namespace.
name()namespace()of(*names)Create the NameIdentifier with the given levels of names.
parse(identifier)Create a NameIdentifier from the given identifier string.
schema(*[, infer_missing, only, exclude, ...])to_dict([encode_json])to_json(*[, skipkeys, ensure_ascii, ...])Attributes
dataclass_json_config- static check(condition, message, *args)¶
Check the given condition is true. Throw an {@link IllegalNameIdentifierException} if it’s not.
- Args:
condition: The condition to check. message: The message to throw. args: The arguments to the message.
- get_name()¶
Get the name of the NameIdentifier.
- Returns:
The name of the NameIdentifier.
- get_namespace()¶
Get the namespace of the NameIdentifier.
- Returns:
The namespace of the NameIdentifier.
- has_namespace()¶
Check if the NameIdentifier has a namespace.
- Returns:
True if the NameIdentifier has a namespace, false otherwise.
- static of(*names: str) NameIdentifier¶
Create the NameIdentifier with the given levels of names.
- Args:
names The names of the identifier
- Returns:
The created NameIdentifier
- static parse(identifier: str) NameIdentifier¶
Create a NameIdentifier from the given identifier string.
- Args:
identifier: The identifier string
- Returns:
The created NameIdentifier