JSON formatter
JSON formatter.
Shape of the JSON output:
{
"evaluables": {
"model_foo": {
"score": 5.0,
"badge": "🥈",
"pass": true,
"results": {
"rule1": {
"result": "OK",
"severity": null
"message": null
},
"rule2": {
"result": "WARN",
"severity": "medium",
"message": "Model lacks a description."
}
]
},
"model_bar": {
"score": 0.0,
"badge": "🥉",
"pass": false,
"results": {
"rule1": {
"result": "ERR",
"message": "Exception message"
}
}
}
},
"project": {
"score": 2.5,
"badge": "🥉",
"pass": false
}
}
JSONFormatter
Bases: Formatter
Formatter for JSON output.
Source code in src/dbt_score/formatters/json_formatter.py
__init__(*args, **kwargs)
evaluable_evaluated(evaluable, results, score)
Callback when an evaluable item has been evaluated.
Source code in src/dbt_score/formatters/json_formatter.py
project_evaluated(score)
Callback when a project has been evaluated.