Metadata
metadata ¶
Column ¶
Column(name, data_type, stats=None)
Model a column of a dataset.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name |
str
|
The name of the column. |
required |
data_type |
str
|
The type of the data contained in the column. |
required |
stats |
list[StatValue] | None
|
Additional statistics about the column. |
None
|
Source code in src/vectice/models/resource/metadata/column_metadata.py
35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 |
|
DBColumn ¶
DBColumn(
name,
data_type,
is_unique=None,
nullable=None,
is_private_key=None,
is_foreign_key=None,
stats=None,
)
Bases: Column
Model a column of a dataset, like a database column.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name |
str
|
The name of the column. |
required |
data_type |
str
|
The type of the data contained in the column. |
required |
is_unique |
bool | None
|
If the column uniquely defines a record. |
None
|
nullable |
bool | None
|
If the column can contain null value. |
None
|
is_private_key |
bool | None
|
If the column uniquely defines a record, individually or with other columns (can be null). |
None
|
is_foreign_key |
bool | None
|
If the column refers to another one, individually or with other columns (cannot be null). |
None
|
stats |
list[StatValue] | None
|
Additional statistics about the column. |
None
|
Source code in src/vectice/models/resource/metadata/column_metadata.py
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 |
|
DBMetadata ¶
DBMetadata(dbs, size, usage=None, origin=None)
Bases: Metadata
Class that describes metadata of dataset that comes from a database.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
dbs |
list[MetadataDB]
|
The list of databases. |
required |
size |
int
|
The size of the metadata. |
required |
usage |
DatasetSourceUsage | None
|
The usage of the metadata. |
None
|
origin |
str | None
|
The origin of the metadata. |
None
|
Source code in src/vectice/models/resource/metadata/db_metadata.py
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
|
DatasetSourceType ¶
DatasetSourceUsage ¶
File ¶
File(
name,
size,
fingerprint,
created_date=None,
updated_date=None,
uri=None,
columns=None,
dataframe=None,
)
Describe a dataset file.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name |
str
|
The name of the file. |
required |
size |
int
|
The size of the file. |
required |
fingerprint |
str
|
The hash of the file. |
required |
created_date |
str | None
|
The date of creation of the file. |
None
|
updated_date |
str | None
|
The date of last update of the file. |
None
|
uri |
str | None
|
The uri of the file. |
None
|
columns |
list[Column] | None
|
The columns coming from the dataframe with the statistics. |
None
|
dataframe |
DataFrame | None
|
A pandas dataframe which will capture the files metadata. |
None
|
Source code in src/vectice/models/resource/metadata/files_metadata.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 |
|
FilesMetadata ¶
FilesMetadata(files, size, usage=None, origin=None)
Bases: Metadata
The metadata of a set of files.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
files |
list[File]
|
The list of files of the dataset. |
required |
size |
int
|
The size of the set of files. |
required |
usage |
DatasetSourceUsage | None
|
The usage of the dataset. |
None
|
origin |
str | None
|
Where the dataset files come from. |
None
|
Source code in src/vectice/models/resource/metadata/files_metadata.py
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
|
Metadata ¶
Metadata(size, type, usage=None, origin=None)
This class describes the metadata of a dataset.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
size |
int
|
The size of the file. |
required |
type |
DatasetSourceType
|
The type of file. |
required |
usage |
DatasetSourceUsage | None
|
The usage made of the data. |
None
|
origin |
str | None
|
The origin of the data. |
None
|
Source code in src/vectice/models/resource/metadata/base.py
61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 |
|
MetadataDB ¶
MetadataDB(name, columns, rows_number, size=None)
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name |
str
|
The name of the table. |
required |
columns |
list[DBColumn]
|
The columns that compose the table. |
required |
rows_number |
int
|
The number of row of the table. |
required |
size |
int | None
|
The size of the table. |
None
|
Source code in src/vectice/models/resource/metadata/db_metadata.py
45 46 47 48 49 50 51 52 53 54 55 56 57 |
|