gravitino.dto.catalog_dto.CatalogDTO¶
- class gravitino.dto.catalog_dto.CatalogDTO(_name: str, _type: Type, _provider: str, _comment: str, _properties: Dict[str, str], _audit: AuditDTO | None = None)¶
Bases:
Catalog
Data transfer object representing catalog information.
- __init__(_name: str, _type: Type, _provider: str, _comment: str, _properties: Dict[str, str], _audit: AuditDTO | None = None) None ¶
Methods
__init__
(_name, _type, _provider, _comment, ...)Raises:
Return the {@link SupportsSchemas} if the catalog supports schema operations.
Raises:
Returns:
audit_info
()builder
([name, catalog_type, provider, ...])comment
()The comment of the catalog.
name
()Returns:
The properties of the catalog.
provider
()Returns:
type
()Returns:
Attributes
A reserved property to specify the package location of the catalog.
- PROPERTY_PACKAGE = 'package'¶
A reserved property to specify the package location of the catalog. The “package” is a string of path to the folder where all the catalog related dependencies is located. The dependencies under the “package” will be loaded by Gravitino to create the catalog.
The property “package” is not needed if the catalog is a built-in one, Gravitino will search the proper location using “provider” to load the dependencies. Only when the folder is in different location, the “package” property is needed.
- class Type(value)¶
Bases:
Enum
The type of the catalog.
- FILESET = 'fileset'¶
Catalog Type for Fileset System (including HDFS, S3, etc.), like path/to/file
- MESSAGING = 'messaging'¶
Catalog Type for Message Queue, like kafka://topic
- RELATIONAL = 'relational'¶
“Catalog Type for Relational Data Structure, like db.table, catalog.db.table.
- UNSUPPORTED = 'unsupported'¶
Catalog Type for test only.
- as_fileset_catalog() FilesetCatalog ¶
- Raises:
UnsupportedOperationException if the catalog does not support fileset operations.
- Returns:
the FilesetCatalog if the catalog supports fileset operations.
- as_schemas() SupportsSchemas ¶
Return the {@link SupportsSchemas} if the catalog supports schema operations.
- Raises:
UnsupportedOperationException if the catalog does not support schema operations.
- Returns:
The {@link SupportsSchemas} if the catalog supports schema operations.
- as_table_catalog() TableCatalog ¶
- Raises:
UnsupportedOperationException if the catalog does not support table operations.
- Returns:
the {@link TableCatalog} if the catalog supports table operations.
- as_topic_catalog() TopicCatalog ¶
- Returns:
the {@link TopicCatalog} if the catalog supports topic operations.
- Raises:
UnsupportedOperationException if the catalog does not support topic operations.
- comment() str ¶
The comment of the catalog. Note. this method will return null if the comment is not set for this catalog.
- Returns:
The provider of the catalog.
- name() str ¶
- Returns:
The name of the catalog.
- properties() Dict[str, str] ¶
The properties of the catalog. Note, this method will return null if the properties are not set.
- Returns:
The properties of the catalog.
- provider() str ¶
- Returns:
The provider of the catalog.