This repository was archived by the owner on May 17, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 288
Refactor Artifacts Parser to be Native so it's less brittle with each dbt version change #688
Merged
Merged
Changes from 35 commits
Commits
Show all changes
40 commits
Select commit
Hold shift + click to select a range
9a85329
helpful notes for sung
e25163d
v1 of native run results parser
13fead8
remove debug comments
546f991
remove from import
13ef7bb
Update data_diff/dbt_parser.py
sungchun12 878be3c
Update data_diff/dbt_parser.py
sungchun12 71a0333
remove an import
8e2d9f2
remove another print
b262646
add schema validation for specific fields
5375832
stricter validation
aae3d72
replaced manifest parser with native one
224028b
Apply suggestions from code review for spacing
sungchun12 8a30c6e
Apply suggestions from code review for double quotes
sungchun12 1aeb072
create space
f60afc6
Apply suggestions from code review for more formatting
sungchun12 ad8f16b
add more necessary fields
69c0354
something to think through
dbafe21
better type hints
5307a42
remove comment
4aa40dd
separation of duties
e0d98fe
remove mock call
da727a9
draft unit tests
5fe47e9
first draft of unit tests
f3c4cb1
passing tests
01b59d9
more pythonic
545ef0e
remove nested git repo
f0a7b01
require name
5c72749
add strictness
0bfe69f
black formatting
a092a93
reduce scope of changes
ab3b89b
fix imports
8246f18
update patches
d62ab3c
fix mocking
b5370fa
fix test failure
1d4a34b
fix mock tests
3b4844b
Merge branch 'master' into refactor/native-manifest-parser
dlawin bef7a73
remove submodule
2e682e2
update toml
385d96e
remove submodule again
2e938db
add pydantic back in
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
from enum import Enum | ||
from typing import List, Dict, Optional, Any | ||
from pydantic import BaseModel, Field | ||
|
||
|
||
class ManifestJsonConfig(BaseModel): | ||
class Metadata(BaseModel): | ||
dbt_version: str = Field(..., regex=r"^\d+\.\d+\.\d+([a-zA-Z0-9]+)?$") | ||
project_id: str | ||
user_id: str | ||
|
||
class Nodes(BaseModel): | ||
class Config(BaseModel): | ||
database: Optional[str] | ||
schema_: Optional[str] = Field(..., alias="schema") | ||
tags: List[str] | ||
|
||
class Column(BaseModel): | ||
meta: Dict[str, Any] | ||
tags: List[str] | ||
|
||
class TestMetadata(BaseModel): | ||
name: str | ||
kwargs: Dict[str, Any] | ||
|
||
class DependsOn(BaseModel): | ||
macros: List[str] = [] | ||
nodes: List[str] = [] | ||
|
||
unique_id: str | ||
resource_type: str | ||
name: str | ||
alias: str | ||
database: str | ||
schema_: str = Field(..., alias="schema") | ||
columns: Optional[Dict[str, Column]] | ||
meta: Dict[str, Any] | ||
config: Config | ||
tags: List[str] | ||
test_metadata: Optional[TestMetadata] | ||
depends_on: DependsOn | ||
|
||
metadata: Metadata | ||
nodes: Dict[str, Nodes] | ||
|
||
|
||
class RunResultsJsonConfig(BaseModel): | ||
class Metadata(BaseModel): | ||
dbt_version: str = Field(..., regex=r"^\d+\.\d+\.\d+([a-zA-Z0-9]+)?$") | ||
|
||
class Results(BaseModel): | ||
class Status(Enum): | ||
success = "success" | ||
error = "error" | ||
skipped = "skipped" | ||
pass_ = "pass" | ||
fail = "fail" | ||
warn = "warn" | ||
runtime_error = "runtime error" | ||
|
||
status: Status | ||
unique_id: str = Field("...") | ||
|
||
metadata: Metadata | ||
results: List[Results] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule datafold-demo-sung
added at
0f8322
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.