models
This module contains the metadata (and other) models that are used in the kiara_plugin.tabular
package.
Those models are convenience wrappers that make it easier for kiara to find, create, manage and version metadata -- but also other type of models -- that is attached to data, as well as kiara modules.
Metadata models must be a sub-class of [kiara.metadata.MetadataModel][]. Other models usually sub-class a pydantic BaseModel or implement custom base classes.
Classes¶
StorageBackend
¶
Bases: BaseModel
Describes the storage backend type that is used, and (optionally) some backend-specific properties.
Source code in /opt/hostedtoolcache/Python/3.11.4/x64/lib/python3.11/site-packages/kiara_plugin/tabular/models/__init__.py
21 22 23 24 25 26 27 |
|
ColumnSchema
¶
Bases: BaseModel
Describes properties of a single column of the 'table' data type.
Source code in /opt/hostedtoolcache/Python/3.11.4/x64/lib/python3.11/site-packages/kiara_plugin/tabular/models/__init__.py
30 31 32 33 34 35 36 37 38 39 40 41 42 |
|
TableMetadata
¶
Bases: KiaraModel
Describes properties for the 'table' data type.
Source code in /opt/hostedtoolcache/Python/3.11.4/x64/lib/python3.11/site-packages/kiara_plugin/tabular/models/__init__.py
45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 |
|
Attributes¶
column_names: List[str] = Field(description='The name of the columns of the table.')
class-attribute
instance-attribute
¶
column_schema: Dict[str, ColumnSchema] = Field(description='The schema description of the table.')
class-attribute
instance-attribute
¶
backend: StorageBackend = Field(description='The storage backend that is used.')
class-attribute
instance-attribute
¶
rows: int = Field(description='The number of rows the table contains.')
class-attribute
instance-attribute
¶
size: Union[int, None] = Field(description='The tables size in bytes.', default=None)
class-attribute
instance-attribute
¶
Functions¶
create_from_table(table: KiaraTable) -> TableMetadata
classmethod
¶
Source code in /opt/hostedtoolcache/Python/3.11.4/x64/lib/python3.11/site-packages/kiara_plugin/tabular/models/__init__.py
48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 |
|