-
Notifications
You must be signed in to change notification settings - Fork 17
/
catalog_v1.py
74 lines (58 loc) · 1.77 KB
/
catalog_v1.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
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
# generated by datamodel-codegen:
# filename: catalog_v1.json
from __future__ import annotations
from typing import Dict, List, Optional, Union
from pydantic import AwareDatetime, ConfigDict, Field
from dbt_artifacts_parser.parsers.base import BaseParserModel
class CatalogMetadata(BaseParserModel):
model_config = ConfigDict(
extra='forbid',
)
dbt_schema_version: Optional[str] = 'https://schemas.getdbt.com/dbt/catalog/v1.json'
dbt_version: Optional[str] = '0.19.0'
generated_at: Optional[AwareDatetime] = '2021-02-10T04:42:33.680487Z'
invocation_id: Optional[str] = None
env: Optional[Dict[str, str]] = {}
class TableMetadata(BaseParserModel):
model_config = ConfigDict(
extra='forbid',
)
type: str
database: Optional[str] = None
schema_: str = Field(..., alias='schema')
name: str
comment: Optional[str] = None
owner: Optional[str] = None
class ColumnMetadata(BaseParserModel):
model_config = ConfigDict(
extra='forbid',
)
type: str
comment: Optional[str] = None
index: int
name: str
class StatsItem(BaseParserModel):
model_config = ConfigDict(
extra='forbid',
)
id: str
label: str
value: Optional[Union[bool, str, float]] = None
description: Optional[str] = None
include: bool
class CatalogTable(BaseParserModel):
model_config = ConfigDict(
extra='forbid',
)
metadata: TableMetadata
columns: Dict[str, ColumnMetadata]
stats: Dict[str, StatsItem]
unique_id: Optional[str] = None
class CatalogV1(BaseParserModel):
model_config = ConfigDict(
extra='forbid',
)
metadata: CatalogMetadata
nodes: Dict[str, CatalogTable]
sources: Dict[str, CatalogTable]
errors: Optional[List[str]] = None