gravitino.dto.fileset_dto.FilesetDTO¶
- class gravitino.dto.fileset_dto.FilesetDTO(_name: str, _comment: str | None, _type: Type, _properties: Dict[str, str], _storage_location: str | None = None, _audit: AuditDTO | None = None)¶
Bases:
Fileset
,DataClassJsonMixin
Represents a Fileset DTO (Data Transfer Object).
- __init__(_name: str, _comment: str | None, _type: Type, _properties: Dict[str, str], _storage_location: str | None = None, _audit: AuditDTO | None = None) None ¶
Methods
__init__
(_name, _comment, _type, _properties)audit_info
()comment
()Returns:
from_dict
(kvs, *[, infer_missing])from_json
(s, *[, parse_float, parse_int, ...])name
()Returns:
Returns:
schema
(*[, infer_missing, only, exclude, ...])Get the storage location of the file or directory path that is managed by this fileset object.
to_dict
([encode_json])to_json
(*[, skipkeys, ensure_ascii, ...])type
()@Returns:
Attributes
dataclass_json_config
- class Type(value)¶
Bases:
Enum
An enum representing the type of the fileset object.
- EXTERNAL = 'external'¶
Fileset is not managed by Gravitino. When specified, the data will not be deleted when the fileset object is deleted
- MANAGED = 'managed'¶
Fileset is managed by Gravitino. When specified, the data will be deleted when the fileset object is deleted
- comment() str | None ¶
- Returns:
The comment of the fileset object. Null is returned if no comment is set.
- name() str ¶
- Returns:
Name of the fileset object.
- properties() Dict[str, str] ¶
- Returns:
The properties of the fileset object. Empty map is returned if no properties are set.
- storage_location() str ¶
Get the storage location of the file or directory path that is managed by this fileset object.
The returned storageLocation can either be the one specified when creating the fileset object, or the one specified in the catalog / schema level if the fileset object is created under this catalog / schema.
For managed fileset, the storageLocation can be:
The one specified when creating the fileset object.
2) When catalog property “location” is specified but schema property “location” is not specified, then the storageLocation will be “{catalog location}/schemaName/filesetName”.
3) When catalog property “location” is not specified but schema property “location” is specified, then the storageLocation will be “{schema location}/filesetName”.
4) When both catalog property “location” and schema property “location” are specified, then the storageLocation will be “{schema location}/filesetName”.
5) When both catalog property “location” and schema property “location” are not specified, and storageLocation specified when creating the fileset object is null, this situation is illegal.
For external fileset, the storageLocation can be:
The one specified when creating the fileset object.
- Returns:
The storage location of the fileset object.