{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "schema_version": {
      "type": "string",
      "const": "1.0.0"
    },
    "asset_id": {
      "type": "string",
      "pattern": "^(?:[a-z0-9]+(?:-[a-z0-9]+)*\\/){3}[a-z0-9]+(?:-[a-z0-9]+)*$"
    },
    "row_count": {
      "type": "integer",
      "minimum": 0,
      "maximum": 9007199254740991
    },
    "columns": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1
          },
          "type": {
            "type": "string",
            "enum": [
              "string",
              "number",
              "boolean",
              "date"
            ]
          },
          "unit": {
            "type": "string",
            "minLength": 1
          },
          "distinct_count": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "min": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "number"
              },
              {
                "type": "boolean"
              }
            ]
          },
          "max": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "number"
              },
              {
                "type": "boolean"
              }
            ]
          }
        },
        "required": [
          "name",
          "type"
        ],
        "additionalProperties": false
      },
      "description": "Column names must be unique; uniqueness is enforced by the Zod schema and catalog validator."
    }
  },
  "required": [
    "schema_version",
    "asset_id",
    "row_count",
    "columns"
  ],
  "additionalProperties": false
}
