-
Notifications
You must be signed in to change notification settings - Fork 18
/
catalog_v1.py
85 lines (67 loc) · 2.01 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
75
76
77
78
79
80
81
82
83
84
85
# generated by datamodel-codegen:
# filename: catalog_v1.json
from __future__ import annotations
from typing import Any, Dict, List, Optional, Union
from pydantic import ConfigDict, Field
from dbt_artifacts_parser.parsers.base import BaseParserModel
class Metadata(BaseParserModel):
model_config = ConfigDict(
extra='forbid',
)
dbt_schema_version: Optional[str] = None
dbt_version: Optional[str] = '1.9.0b2'
generated_at: Optional[str] = None
invocation_id: Optional[str] = None
env: Optional[Dict[str, str]] = None
class Metadata1(BaseParserModel):
model_config = ConfigDict(
extra='forbid',
)
type: str
schema_: str = Field(..., alias='schema')
name: str
database: Optional[str] = None
comment: Optional[str] = None
owner: Optional[str] = None
class Columns(BaseParserModel):
model_config = ConfigDict(
extra='forbid',
)
type: str
index: int
name: str
comment: Optional[str] = None
class Stats(BaseParserModel):
model_config = ConfigDict(
extra='forbid',
)
id: str
label: str
value: Optional[Union[bool, str, float]] = None
include: bool
description: Optional[str] = None
class Nodes(BaseParserModel):
model_config = ConfigDict(
extra='forbid',
)
metadata: Metadata1 = Field(..., title='TableMetadata')
columns: Dict[str, Columns]
stats: Dict[str, Stats]
unique_id: Optional[str] = None
class Sources(BaseParserModel):
model_config = ConfigDict(
extra='forbid',
)
metadata: Metadata1 = Field(..., title='TableMetadata')
columns: Dict[str, Columns]
stats: Dict[str, Stats]
unique_id: Optional[str] = None
class CatalogV1(BaseParserModel):
model_config = ConfigDict(
extra='forbid',
)
metadata: Metadata = Field(..., title='CatalogMetadata')
nodes: Dict[str, Nodes]
sources: Dict[str, Sources]
errors: Optional[List[str]] = None
field_compile_results: Any = Field(None, alias='_compile_results')