61 lines
1.4 KiB
Python
61 lines
1.4 KiB
Python
from pydantic import BaseModel
|
|
|
|
|
|
class Schema(BaseModel):
|
|
"""Where multiple tables are stored
|
|
|
|
id: uniq identifier for the schema
|
|
repo_id: id of the repo where the schema belong to
|
|
name: name of the schema
|
|
value: string which describe where to find the schema in the repository
|
|
"""
|
|
|
|
id: str
|
|
repo_id: str
|
|
name: str
|
|
value: str
|
|
tables: list[str] = []
|
|
|
|
|
|
class Table(BaseModel):
|
|
"""Place where same structured data are stored
|
|
|
|
id: uniq identifier for the table
|
|
repo_id: id of the repo where the table belong to
|
|
schema_id: id of the schema where table belong to
|
|
name: the name of the table
|
|
value: string which describe where to find the table in the storage system
|
|
|
|
partitions: list of partitions
|
|
datas: list of string to access data
|
|
|
|
"""
|
|
|
|
id: str
|
|
repo_id: str
|
|
schema_id: str
|
|
name: str
|
|
value: str
|
|
partitions: list[str] = []
|
|
datas: list[str]
|
|
|
|
|
|
class Partition(BaseModel):
|
|
"""Place where data are stored
|
|
|
|
id: uniq identifier for the table
|
|
repo_id: id of the repo where the table belong to
|
|
schema_id: id of the schema where table belong to
|
|
table_id: id of the schema where table belong to
|
|
name: the name of the partition
|
|
value: string which describe where to find the partition in the storage system
|
|
|
|
"""
|
|
|
|
id: str
|
|
repo_id: str
|
|
schema_id: str
|
|
table_id: str
|
|
name: str
|
|
value: str
|