From bda721963ecca8429a9b0ca548187f26432f6e45 Mon Sep 17 00:00:00 2001 From: Peter Allen Webb Date: Wed, 30 Aug 2023 15:05:37 -0400 Subject: [PATCH] Regenerate run_results schema after merging in changes from main. --- schemas/dbt/run-results/v5.json | 377 ++++++++------------------------ 1 file changed, 87 insertions(+), 290 deletions(-) diff --git a/schemas/dbt/run-results/v5.json b/schemas/dbt/run-results/v5.json index d3de5dde91e..4e400e5f18a 100644 --- a/schemas/dbt/run-results/v5.json +++ b/schemas/dbt/run-results/v5.json @@ -1,86 +1,87 @@ { - "type": "object", - "required": [ - "metadata", - "results", - "elapsed_time" - ], - "properties": { - "metadata": { - "$ref": "#/definitions/BaseArtifactMetadata" - }, - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/RunResultOutput" - } - }, - "elapsed_time": { - "type": "number" - }, - "args": { - "type": "object", - "default": {} - } - }, - "additionalProperties": false, - "description": "RunResultsArtifact(metadata: dbt.contracts.util.BaseArtifactMetadata, results: Sequence[dbt.contracts.results.RunResultOutput], elapsed_time: float, args: Dict[str, Any] = )", - "definitions": { + "$ref": "#/$defs/RunResultsArtifact", + "$defs": { "BaseArtifactMetadata": { "type": "object", - "required": [ - "dbt_schema_version" - ], + "title": "BaseArtifactMetadata", "properties": { "dbt_schema_version": { "type": "string" }, "dbt_version": { "type": "string", - "default": "1.7.0a1" + "default": "1.7.0b1" }, "generated_at": { - "type": "string", - "format": "date-time", - "default": "2023-08-29T13:55:29.476136Z" + "type": "string" }, "invocation_id": { - "oneOf": [ + "anyOf": [ { "type": "string" }, { "type": "null" } - ], - "default": "6685b5a0-c2a6-4fb5-88f6-05d7501d6cf2" + ] }, "env": { "type": "object", "additionalProperties": { "type": "string" }, - "default": {} + "propertyNames": { + "type": "string" + } } }, "additionalProperties": false, - "description": "BaseArtifactMetadata(dbt_schema_version: str, dbt_version: str = '1.7.0a1', generated_at: datetime.datetime = , invocation_id: Union[str, NoneType] = , env: Dict[str, str] = )" + "required": [ + "dbt_schema_version" + ] }, - "RunResultOutput": { + "TimingInfo": { "type": "object", + "title": "TimingInfo", + "properties": { + "name": { + "type": "string" + }, + "started_at": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "completed_at": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + } + }, + "additionalProperties": false, "required": [ - "status", - "timing", - "thread_id", - "execution_time", - "adapter_response", - "unique_id" - ], + "name" + ] + }, + "RunResultOutput": { + "type": "object", + "title": "RunResultOutput", "properties": { "status": { - "oneOf": [ + "anyOf": [ { - "type": "string", "enum": [ "success", "error", @@ -88,7 +89,6 @@ ] }, { - "type": "string", "enum": [ "pass", "error", @@ -98,7 +98,6 @@ ] }, { - "type": "string", "enum": [ "pass", "warn", @@ -111,7 +110,7 @@ "timing": { "type": "array", "items": { - "$ref": "#/definitions/TimingInfo" + "$ref": "#/$defs/TimingInfo" } }, "thread_id": { @@ -121,10 +120,13 @@ "type": "number" }, "adapter_response": { - "type": "object" + "type": "object", + "propertyNames": { + "type": "string" + } }, "message": { - "oneOf": [ + "anyOf": [ { "type": "string" }, @@ -134,7 +136,7 @@ ] }, "failures": { - "oneOf": [ + "anyOf": [ { "type": "integer" }, @@ -147,7 +149,7 @@ "type": "string" }, "compiled": { - "oneOf": [ + "anyOf": [ { "type": "boolean" }, @@ -157,7 +159,7 @@ ] }, "compiled_code": { - "oneOf": [ + "anyOf": [ { "type": "string" }, @@ -167,266 +169,61 @@ ] }, "relation_name": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - } - }, - "additionalProperties": false, - "description": "RunResultOutput(status: Union[dbt.contracts.results.RunStatus, dbt.contracts.results.TestStatus, dbt.contracts.results.FreshnessStatus], timing: List[dbt.contracts.results.TimingInfo], thread_id: str, execution_time: float, adapter_response: Dict[str, Any], message: Union[str, NoneType], failures: Union[int, NoneType], unique_id: str, compiled: Union[bool, NoneType], compiled_code: Union[str, NoneType], relation_name: Union[str, NoneType])" - }, - "TimingInfo": { - "type": "object", - "required": [ - "name" - ], - "properties": { - "name": { - "type": "string" - }, - "started_at": { - "oneOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ] - }, - "completed_at": { - "oneOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ] - } - }, - "additionalProperties": false, - "description": "TimingInfo(name: str, started_at: Union[datetime.datetime, NoneType] = None, completed_at: Union[datetime.datetime, NoneType] = None)" - }, - "FreshnessMetadata": { - "type": "object", - "required": [], - "properties": { - "dbt_schema_version": { - "type": "string", - "default": "https://schemas.getdbt.com/dbt/sources/v3.json" - }, - "dbt_version": { - "type": "string", - "default": "1.7.0a1" - }, - "generated_at": { - "type": "string", - "format": "date-time", - "default": "2023-08-29T13:55:29.475275Z" - }, - "invocation_id": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": "6685b5a0-c2a6-4fb5-88f6-05d7501d6cf2" - }, - "env": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "default": {} - } - }, - "additionalProperties": false, - "description": "FreshnessMetadata(dbt_schema_version: str = , dbt_version: str = '1.7.0a1', generated_at: datetime.datetime = , invocation_id: Union[str, NoneType] = , env: Dict[str, str] = )" - }, - "SourceFreshnessRuntimeError": { - "type": "object", - "required": [ - "unique_id", - "status" - ], - "properties": { - "unique_id": { - "type": "string" - }, - "error": { - "oneOf": [ + "anyOf": [ { "type": "string" }, - { - "type": "integer" - }, { "type": "null" } ] - }, - "status": { - "type": "string", - "enum": [ - "runtime error" - ] } }, "additionalProperties": false, - "description": "SourceFreshnessRuntimeError(unique_id: str, error: Union[str, int, NoneType], status: dbt.contracts.results.FreshnessErrorEnum)" - }, - "SourceFreshnessOutput": { - "type": "object", "required": [ - "unique_id", - "max_loaded_at", - "snapshotted_at", - "max_loaded_at_time_ago_in_s", "status", - "criteria", - "adapter_response", "timing", "thread_id", - "execution_time" - ], + "execution_time", + "adapter_response", + "message", + "failures", + "unique_id", + "compiled", + "compiled_code", + "relation_name" + ] + }, + "RunResultsArtifact": { + "type": "object", + "title": "RunResultsArtifact", "properties": { - "unique_id": { - "type": "string" + "metadata": { + "$ref": "#/$defs/BaseArtifactMetadata" }, - "max_loaded_at": { - "type": "string", - "format": "date-time" - }, - "snapshotted_at": { - "type": "string", - "format": "date-time" - }, - "max_loaded_at_time_ago_in_s": { - "type": "number" - }, - "status": { - "type": "string", - "enum": [ - "pass", - "warn", - "error", - "runtime error" - ] - }, - "criteria": { - "$ref": "#/definitions/FreshnessThreshold" - }, - "adapter_response": { - "type": "object" - }, - "timing": { + "results": { "type": "array", "items": { - "$ref": "#/definitions/TimingInfo" + "$ref": "#/$defs/RunResultOutput" } }, - "thread_id": { - "type": "string" - }, - "execution_time": { + "elapsed_time": { "type": "number" - } - }, - "additionalProperties": false, - "description": "SourceFreshnessOutput(unique_id: str, max_loaded_at: datetime.datetime, snapshotted_at: datetime.datetime, max_loaded_at_time_ago_in_s: float, status: dbt.contracts.results.FreshnessStatus, criteria: dbt.contracts.graph.unparsed.FreshnessThreshold, adapter_response: Dict[str, Any], timing: List[dbt.contracts.results.TimingInfo], thread_id: str, execution_time: float)" - }, - "FreshnessThreshold": { - "type": "object", - "required": [], - "properties": { - "warn_after": { - "oneOf": [ - { - "$ref": "#/definitions/Time" - }, - { - "type": "null" - } - ], - "default": { - "count": null, - "period": null - } }, - "error_after": { - "oneOf": [ - { - "$ref": "#/definitions/Time" - }, - { - "type": "null" - } - ], - "default": { - "count": null, - "period": null + "args": { + "type": "object", + "propertyNames": { + "type": "string" } - }, - "filter": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] } }, "additionalProperties": false, - "description": "FreshnessThreshold(warn_after: Union[dbt.contracts.graph.unparsed.Time, NoneType] = , error_after: Union[dbt.contracts.graph.unparsed.Time, NoneType] = , filter: Union[str, NoneType] = None)" - }, - "Time": { - "type": "object", - "required": [], - "properties": { - "count": { - "oneOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ] - }, - "period": { - "oneOf": [ - { - "type": "string", - "enum": [ - "minute", - "hour", - "day" - ] - }, - { - "type": "null" - } - ] - } - }, - "additionalProperties": false, - "description": "Time(count: Union[int, NoneType] = None, period: Union[dbt.contracts.graph.unparsed.TimePeriod, NoneType] = None)" + "required": [ + "metadata", + "results", + "elapsed_time" + ] } }, - "$schema": "http://json-schema.org/draft-07/schema#", "$id": "https://schemas.getdbt.com/dbt/run-results/v5.json" }