gravitino.api.catalog.Catalog¶
- class gravitino.api.catalog.Catalog¶
Bases:
Auditable
The interface of a catalog. The catalog is the second level entity in the gravitino system, containing a set of tables.
- __init__()¶
Methods
__init__
()Raises:
Returns:
Return the {@link SupportsSchemas} if the catalog supports schema operations.
Raises:
Returns:
audit_info
()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', False)¶
Catalog Type for Fileset System (including HDFS, S3, etc.), like path/to/file
- MESSAGING = ('messaging', False)¶
Catalog Type for Message Queue, like kafka://topic
- MODEL = ('model', True)¶
Catalog Type for ML model
- RELATIONAL = ('relational', False)¶
“Catalog Type for Relational Data Structure, like db.table, catalog.db.table.
- UNSUPPORTED = ('unsupported', False)¶
Catalog Type for test only.
- property supports_managed_catalog¶
A flag to indicate if the catalog type supports managed catalog. Managed catalog is a concept in Gravitino, which means Gravitino will manage the lifecycle of the catalog and its subsidiaries. If the catalog type supports managed catalog, users can create managed catalog of this type without specifying the catalog provider, Gravitino will use the type as the provider to create the managed catalog. If the catalog type does not support managed catalog, users need to specify the provider to create the catalog.
- property type_name¶
The name of the catalog type.
- as_fileset_catalog() FilesetCatalog ¶
- Raises:
UnsupportedOperationException if the catalog does not support fileset operations.
- Returns:
the FilesetCatalog if the catalog supports fileset operations.
- as_model_catalog() ModelCatalog ¶
- Returns:
the {@link ModelCatalog} if the catalog supports model operations.
- Raises:
UnsupportedOperationException if the catalog does not support model 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.
- abstract comment() str | None ¶
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.
- abstract name() str ¶
- Returns:
The name of the catalog.
- abstract properties() Dict[str, str] | None ¶
The properties of the catalog. Note, this method will return null if the properties are not set.
- Returns:
The properties of the catalog.
- abstract provider() str ¶
- Returns:
The provider of the catalog.