gravitino.client.generic_schema.GenericSchema¶
- class gravitino.client.generic_schema.GenericSchema(schema_dto: SchemaDTO, rest_client: HTTPClient, metalake: str, catalog: str)¶
Bases:
Schema,SupportsTags- __init__(schema_dto: SchemaDTO, rest_client: HTTPClient, metalake: str, catalog: str) None¶
Methods
__init__(schema_dto, rest_client, metalake, ...)associate_tags(tags_to_add, tags_to_remove)Associate tags to the specific object.
audit_info()comment()Returns the comment of the Schema.
get_tag(name)Get a tag by its name for the specific object.
List all the tag names for the specific object.
List all the tags with details for the specific object.
name()Returns the name of the Schema.
Returns the properties of the Schema.
supports_tags()- associate_tags(tags_to_add: list[str], tags_to_remove: list[str]) list[str]¶
Associate tags to the specific object.
The tags_to_add will be added to the object, and the tags_to_remove will be removed from the object.
Note that: 1. Adding or removing tags that are not existed will be ignored. 2. If the same name tag is in both tags_to_add and tags_to_remove, it will be ignored. 3. If the tag is already associated with the object, it will raise TagAlreadyAssociatedException.
- Args:
tags_to_add (list[str]): The arrays of tag name to be added to the object. tags_to_remove (list[str]): The array of tag name to be removed from the object.
- Raises:
TagAlreadyAssociatedException: If the tag is already associated with the object.
- Returns:
list[str]: The array of tag names that are associated with the object.
- comment() str | None¶
Returns the comment of the Schema. None is returned if the comment is not set.
- get_tag(name: str) Tag¶
Get a tag by its name for the specific object.
- Args:
name (str): The name of the tag.
- Raises:
NoSuchTagException: If the tag does not associate with the object.
- Returns:
Tag: The tag.
- list_tags() list[str]¶
List all the tag names for the specific object.
- Returns:
list[str]: The list of tag names.
- list_tags_info() list[gravitino.api.tag.tag.Tag]¶
List all the tags with details for the specific object.
- Returns:
list[Tag]: The list of tags.
- name() str¶
Returns the name of the Schema.
- properties() Dict[str, str]¶
Returns the properties of the Schema. An empty dictionary is returned if no properties are set.