{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "title": "RunResultsArtifact",
  "properties": {
    "metadata": {
      "type": "object",
      "title": "BaseArtifactMetadata",
      "properties": {
        "dbt_schema_version": {
          "type": "string"
        },
        "dbt_version": {
          "type": "string",
          "default": "1.7.14"
        },
        "generated_at": {
          "type": "string"
        },
        "invocation_id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "env": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          },
          "propertyNames": {
            "type": "string"
          }
        }
      },
      "additionalProperties": false,
      "required": [
        "dbt_schema_version"
      ]
    },
    "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"
              ]
            }
          },
          "thread_id": {
            "type": "string"
          },
          "execution_time": {
            "type": "number"
          },
          "adapter_response": {
            "type": "object",
            "propertyNames": {
              "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": [
              {
                "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"
        ]
      }
    },
    "elapsed_time": {
      "type": "number"
    },
    "args": {
      "type": "object",
      "propertyNames": {
        "type": "string"
      }
    }
  },
  "additionalProperties": false,
  "required": [
    "metadata",
    "results",
    "elapsed_time"
  ],
  "$id": "https://schemas.getdbt.com/dbt/run-results/v5.json"
}