Schema Registry
Each schema table is registered in SchemaRegistry dynamically at the runtime.
build_schema(name, filepath)
Build schema dataclass from json file path.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str | SchemaName
|
Name of schema table. |
required |
filepath
|
str
|
Path to json file. |
required |
Returns:
| Type | Description |
|---|---|
list[SchemaTable]
|
List of schema dataclasses. |
Source code in t4_devkit/schema/builder.py
SCHEMAS = SchemaRegistry()
module-attribute
SchemaRegistry
A manager class to register schema tables.
Source code in t4_devkit/schema/tables/registry.py
build_from_json(key, filepath)
Build schema dataclass from json.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
key
|
str
|
Name of schema field. |
required |
filepath
|
str
|
Path to schema json file. |
required |
Returns:
| Type | Description |
|---|---|
list[SchemaTable]
|
Instantiated dataclass. |