diff --git a/schemas/dbt/catalog/v1.json b/schemas/dbt/catalog/v1.json index 0493014e5e7..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": { @@ -10,7 +12,7 @@ }, "dbt_version": { "type": "string", - "default": "1.7.0b1" + "default": "1.8.0a1" }, "generated_at": { "type": "string" @@ -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" } diff --git a/schemas/dbt/sources/v3.json b/schemas/dbt/sources/v3.json index 31dc016bff9..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": { @@ -10,7 +12,7 @@ }, "dbt_version": { "type": "string", - "default": "1.7.0b1" + "default": "1.8.0a1" }, "generated_at": { "type": "string" @@ -37,238 +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", - "format": "date-time" - }, - { - "type": "null" - } - ], - "default": null - }, - "completed_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" + "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" }