diff --git a/schemas/dbt/catalog/v1.json b/schemas/dbt/catalog/v1.json index 1a8735125ea..3aabdf34ecf 100644 --- a/schemas/dbt/catalog/v1.json +++ b/schemas/dbt/catalog/v1.json @@ -1,7 +1,9 @@ { - "$ref": "#/$defs/CatalogArtifact", - "$defs": { - "CatalogMetadata": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "CatalogArtifact", + "properties": { + "metadata": { "type": "object", "title": "CatalogMetadata", "properties": { @@ -37,241 +39,387 @@ }, "additionalProperties": false }, - "TableMetadata": { + "nodes": { "type": "object", - "title": "TableMetadata", - "properties": { - "type": { - "type": "string" - }, - "schema": { - "type": "string" - }, - "name": { - "type": "string" - }, - "database": { - "anyOf": [ - { - "type": "string" + "additionalProperties": { + "type": "object", + "title": "CatalogTable", + "properties": { + "metadata": { + "type": "object", + "title": "TableMetadata", + "properties": { + "type": { + "type": "string" + }, + "schema": { + "type": "string" + }, + "name": { + "type": "string" + }, + "database": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "comment": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "owner": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + } }, - { - "type": "null" - } - ], - "default": null - }, - "comment": { - "anyOf": [ - { - "type": "string" + "additionalProperties": false, + "required": [ + "type", + "schema", + "name" + ] + }, + "columns": { + "type": "object", + "additionalProperties": { + "type": "object", + "title": "ColumnMetadata", + "properties": { + "type": { + "type": "string" + }, + "index": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "comment": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + } + }, + "additionalProperties": false, + "required": [ + "type", + "index", + "name" + ] }, - { - "type": "null" - } - ], - "default": null - }, - "owner": { - "anyOf": [ - { + "propertyNames": { "type": "string" - }, - { - "type": "null" } - ], - "default": null - } - }, - "additionalProperties": false, - "required": [ - "type", - "schema", - "name" - ] - }, - "ColumnMetadata": { - "type": "object", - "title": "ColumnMetadata", - "properties": { - "type": { - "type": "string" - }, - "index": { - "type": "integer" - }, - "name": { - "type": "string" - }, - "comment": { - "anyOf": [ - { - "type": "string" + }, + "stats": { + "type": "object", + "additionalProperties": { + "type": "object", + "title": "StatsItem", + "properties": { + "id": { + "type": "string" + }, + "label": { + "type": "string" + }, + "value": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "null" + } + ] + }, + "include": { + "type": "boolean" + }, + "description": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + } + }, + "additionalProperties": false, + "required": [ + "id", + "label", + "value", + "include" + ] }, - { - "type": "null" + "propertyNames": { + "type": "string" } - ], - "default": null - } + }, + "unique_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + } + }, + "additionalProperties": false, + "required": [ + "metadata", + "columns", + "stats" + ] }, - "additionalProperties": false, - "required": [ - "type", - "index", - "name" - ] + "propertyNames": { + "type": "string" + } }, - "StatsItem": { + "sources": { "type": "object", - "title": "StatsItem", - "properties": { - "id": { - "type": "string" - }, - "label": { - "type": "string" - }, - "value": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "string" + "additionalProperties": { + "type": "object", + "title": "CatalogTable", + "properties": { + "metadata": { + "type": "object", + "title": "TableMetadata", + "properties": { + "type": { + "type": "string" + }, + "schema": { + "type": "string" + }, + "name": { + "type": "string" + }, + "database": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "comment": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + }, + "owner": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + } }, - { - "type": "number" + "additionalProperties": false, + "required": [ + "type", + "schema", + "name" + ] + }, + "columns": { + "type": "object", + "additionalProperties": { + "type": "object", + "title": "ColumnMetadata", + "properties": { + "type": { + "type": "string" + }, + "index": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "comment": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + } + }, + "additionalProperties": false, + "required": [ + "type", + "index", + "name" + ] }, - { - "type": "null" - } - ] - }, - "include": { - "type": "boolean" - }, - "description": { - "anyOf": [ - { + "propertyNames": { "type": "string" - }, - { - "type": "null" } - ], - "default": null - } - }, - "additionalProperties": false, - "required": [ - "id", - "label", - "value", - "include" - ] - }, - "CatalogTable": { - "type": "object", - "title": "CatalogTable", - "properties": { - "metadata": { - "$ref": "#/$defs/TableMetadata" - }, - "columns": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/ColumnMetadata" }, - "propertyNames": { - "type": "string" - } - }, - "stats": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/StatsItem" - }, - "propertyNames": { - "type": "string" - } - }, - "unique_id": { - "anyOf": [ - { - "type": "string" + "stats": { + "type": "object", + "additionalProperties": { + "type": "object", + "title": "StatsItem", + "properties": { + "id": { + "type": "string" + }, + "label": { + "type": "string" + }, + "value": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "null" + } + ] + }, + "include": { + "type": "boolean" + }, + "description": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + } + }, + "additionalProperties": false, + "required": [ + "id", + "label", + "value", + "include" + ] }, - { - "type": "null" + "propertyNames": { + "type": "string" } - ], - "default": null - } - }, - "additionalProperties": false, - "required": [ - "metadata", - "columns", - "stats" - ] - }, - "CatalogArtifact": { - "type": "object", - "title": "CatalogArtifact", - "properties": { - "metadata": { - "$ref": "#/$defs/CatalogMetadata" - }, - "nodes": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/CatalogTable" }, - "propertyNames": { - "type": "string" + "unique_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null } }, - "sources": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/CatalogTable" - }, - "propertyNames": { + "additionalProperties": false, + "required": [ + "metadata", + "columns", + "stats" + ] + }, + "propertyNames": { + "type": "string" + } + }, + "errors": { + "anyOf": [ + { + "type": "array", + "items": { "type": "string" } }, - "errors": { - "anyOf": [ - { - "type": "array", - "items": { - "type": "string" - } - }, - { - "type": "null" - } - ], - "default": null - }, - "_compile_results": { - "anyOf": [ - {}, - { - "type": "null" - } - ], - "default": null + { + "type": "null" } - }, - "additionalProperties": false, - "required": [ - "metadata", - "nodes", - "sources" - ] + ], + "default": null + }, + "_compile_results": { + "anyOf": [ + {}, + { + "type": "null" + } + ], + "default": null } }, + "additionalProperties": false, + "required": [ + "metadata", + "nodes", + "sources" + ], "$id": "https://schemas.getdbt.com/dbt/catalog/v1.json" -} \ No newline at end of file +} diff --git a/schemas/dbt/run-results/v5.json b/schemas/dbt/run-results/v5.json index 640852d54f0..bac472e943f 100644 --- a/schemas/dbt/run-results/v5.json +++ b/schemas/dbt/run-results/v5.json @@ -1,7 +1,9 @@ { - "$ref": "#/$defs/RunResultsArtifact", - "$defs": { - "BaseArtifactMetadata": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "RunResultsArtifact", + "properties": { + "metadata": { "type": "object", "title": "BaseArtifactMetadata", "properties": { @@ -40,190 +42,175 @@ "dbt_schema_version" ] }, - "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": [ - "name" - ] - }, - "RunResultOutput": { - "type": "object", - "title": "RunResultOutput", - "properties": { - "status": { - "anyOf": [ - { - "enum": [ - "success", - "error", - "skipped" - ] - }, - { - "enum": [ - "pass", - "error", - "fail", - "warn", - "skipped" - ] - }, - { - "enum": [ - "pass", - "warn", - "error", - "runtime error" + "results": { + "type": "array", + "items": { + "type": "object", + "title": "RunResultOutput", + "properties": { + "status": { + "anyOf": [ + { + "enum": [ + "success", + "error", + "skipped" + ] + }, + { + "enum": [ + "pass", + "error", + "fail", + "warn", + "skipped" + ] + }, + { + "enum": [ + "pass", + "warn", + "error", + "runtime error" + ] + } + ] + }, + "timing": { + "type": "array", + "items": { + "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": [ + "name" ] } - ] - }, - "timing": { - "type": "array", - "items": { - "$ref": "#/$defs/TimingInfo" - } - }, - "thread_id": { - "type": "string" - }, - "execution_time": { - "type": "number" - }, - "adapter_response": { - "type": "object", - "propertyNames": { + }, + "thread_id": { "type": "string" - } - }, - "message": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "failures": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ] - }, - "unique_id": { - "type": "string" - }, - "compiled": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "null" - } - ] - }, - "compiled_code": { - "anyOf": [ - { + }, + "execution_time": { + "type": "number" + }, + "adapter_response": { + "type": "object", + "propertyNames": { "type": "string" - }, - { - "type": "null" } - ] + }, + "message": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "failures": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ] + }, + "unique_id": { + "type": "string" + }, + "compiled": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ] + }, + "compiled_code": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "relation_name": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } }, - "relation_name": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - } - }, - "additionalProperties": false, - "required": [ - "status", - "timing", - "thread_id", - "execution_time", - "adapter_response", - "message", - "failures", - "unique_id", - "compiled", - "compiled_code", - "relation_name" - ] + "additionalProperties": false, + "required": [ + "status", + "timing", + "thread_id", + "execution_time", + "adapter_response", + "message", + "failures", + "unique_id", + "compiled", + "compiled_code", + "relation_name" + ] + } + }, + "elapsed_time": { + "type": "number" }, - "RunResultsArtifact": { + "args": { "type": "object", - "title": "RunResultsArtifact", - "properties": { - "metadata": { - "$ref": "#/$defs/BaseArtifactMetadata" - }, - "results": { - "type": "array", - "items": { - "$ref": "#/$defs/RunResultOutput" - } - }, - "elapsed_time": { - "type": "number" - }, - "args": { - "type": "object", - "propertyNames": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "metadata", - "results", - "elapsed_time" - ] + "propertyNames": { + "type": "string" + } } }, + "additionalProperties": false, + "required": [ + "metadata", + "results", + "elapsed_time" + ], "$id": "https://schemas.getdbt.com/dbt/run-results/v5.json" -} \ No newline at end of file +} diff --git a/schemas/dbt/sources/v3.json b/schemas/dbt/sources/v3.json index 993dbe6614b..5fae8131f63 100644 --- a/schemas/dbt/sources/v3.json +++ b/schemas/dbt/sources/v3.json @@ -1,7 +1,9 @@ { - "$ref": "#/$defs/FreshnessExecutionResultArtifact", - "$defs": { - "FreshnessMetadata": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "FreshnessExecutionResultArtifact", + "properties": { + "metadata": { "type": "object", "title": "FreshnessMetadata", "properties": { @@ -37,236 +39,242 @@ }, "additionalProperties": false }, - "SourceFreshnessRuntimeError": { - "type": "object", - "title": "SourceFreshnessRuntimeError", - "properties": { - "unique_id": { - "type": "string" - }, - "error": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "integer" - }, - { - "type": "null" - } - ] - }, - "status": { - "enum": [ - "runtime error" - ] - } - }, - "additionalProperties": false, - "required": [ - "unique_id", - "error", - "status" - ] - }, - "Time": { - "type": "object", - "title": "Time", - "properties": { - "count": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "default": null - }, - "period": { - "anyOf": [ - { - "enum": [ - "minute", - "hour", - "day" - ] - }, - { - "type": "null" - } - ], - "default": null - } - }, - "additionalProperties": false - }, - "FreshnessThreshold": { - "type": "object", - "title": "FreshnessThreshold", - "properties": { - "warn_after": { - "anyOf": [ - { - "$ref": "#/$defs/Time" - }, - { - "type": "null" - } - ] - }, - "error_after": { - "anyOf": [ - { - "$ref": "#/$defs/Time" - }, - { - "type": "null" - } - ] - }, - "filter": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - } - }, - "additionalProperties": false - }, - "TimingInfo": { - "type": "object", - "title": "TimingInfo", - "properties": { - "name": { - "type": "string" - }, - "started_at": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null - }, - "completed_at": { - "anyOf": [ - { - "type": "string" + "results": { + "type": "array", + "items": { + "anyOf": [ + { + "type": "object", + "title": "SourceFreshnessRuntimeError", + "properties": { + "unique_id": { + "type": "string" + }, + "error": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "integer" + }, + { + "type": "null" + } + ] + }, + "status": { + "enum": [ + "runtime error" + ] + } }, - { - "type": "null" - } - ], - "default": null - } - }, - "additionalProperties": false, - "required": [ - "name" - ] - }, - "SourceFreshnessOutput": { - "type": "object", - "title": "SourceFreshnessOutput", - "properties": { - "unique_id": { - "type": "string" - }, - "max_loaded_at": { - "type": "string" - }, - "snapshotted_at": { - "type": "string" - }, - "max_loaded_at_time_ago_in_s": { - "type": "number" - }, - "status": { - "enum": [ - "pass", - "warn", - "error", - "runtime error" - ] - }, - "criteria": { - "$ref": "#/$defs/FreshnessThreshold" - }, - "adapter_response": { - "type": "object", - "propertyNames": { - "type": "string" - } - }, - "timing": { - "type": "array", - "items": { - "$ref": "#/$defs/TimingInfo" - } - }, - "thread_id": { - "type": "string" - }, - "execution_time": { - "type": "number" - } - }, - "additionalProperties": false, - "required": [ - "unique_id", - "max_loaded_at", - "snapshotted_at", - "max_loaded_at_time_ago_in_s", - "status", - "criteria", - "adapter_response", - "timing", - "thread_id", - "execution_time" - ] - }, - "FreshnessExecutionResultArtifact": { - "type": "object", - "title": "FreshnessExecutionResultArtifact", - "properties": { - "metadata": { - "$ref": "#/$defs/FreshnessMetadata" - }, - "results": { - "type": "array", - "items": { - "anyOf": [ - { - "$ref": "#/$defs/SourceFreshnessRuntimeError" + "additionalProperties": false, + "required": [ + "unique_id", + "error", + "status" + ] + }, + { + "type": "object", + "title": "SourceFreshnessOutput", + "properties": { + "unique_id": { + "type": "string" + }, + "max_loaded_at": { + "type": "string" + }, + "snapshotted_at": { + "type": "string" + }, + "max_loaded_at_time_ago_in_s": { + "type": "number" + }, + "status": { + "enum": [ + "pass", + "warn", + "error", + "runtime error" + ] + }, + "criteria": { + "type": "object", + "title": "FreshnessThreshold", + "properties": { + "warn_after": { + "anyOf": [ + { + "type": "object", + "title": "Time", + "properties": { + "count": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "default": null + }, + "period": { + "anyOf": [ + { + "enum": [ + "minute", + "hour", + "day" + ] + }, + { + "type": "null" + } + ], + "default": null + } + }, + "additionalProperties": false + }, + { + "type": "null" + } + ] + }, + "error_after": { + "anyOf": [ + { + "type": "object", + "title": "Time", + "properties": { + "count": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "default": null + }, + "period": { + "anyOf": [ + { + "enum": [ + "minute", + "hour", + "day" + ] + }, + { + "type": "null" + } + ], + "default": null + } + }, + "additionalProperties": false + }, + { + "type": "null" + } + ] + }, + "filter": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + } + }, + "additionalProperties": false }, - { - "$ref": "#/$defs/SourceFreshnessOutput" + "adapter_response": { + "type": "object", + "propertyNames": { + "type": "string" + } + }, + "timing": { + "type": "array", + "items": { + "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": [ + "name" + ] + } + }, + "thread_id": { + "type": "string" + }, + "execution_time": { + "type": "number" } + }, + "additionalProperties": false, + "required": [ + "unique_id", + "max_loaded_at", + "snapshotted_at", + "max_loaded_at_time_ago_in_s", + "status", + "criteria", + "adapter_response", + "timing", + "thread_id", + "execution_time" ] } - }, - "elapsed_time": { - "type": "number" - } - }, - "additionalProperties": false, - "required": [ - "metadata", - "results", - "elapsed_time" - ] + ] + } + }, + "elapsed_time": { + "type": "number" } }, + "additionalProperties": false, + "required": [ + "metadata", + "results", + "elapsed_time" + ], "$id": "https://schemas.getdbt.com/dbt/sources/v3.json" -} \ No newline at end of file +}