{
  "$defs": {
    "QualityReport": {
      "description": "Result of validating a tabular/record dataset.\n\nAttributes:\n    row_count: Number of rows inspected.\n    column_count: Number of columns.\n    null_rates: Per-column fraction of null/empty values.\n    duplicate_rows: Count of exact duplicate rows.\n    pii_columns: Columns whose values matched a PII pattern.\n    issues: Human-readable issues found.\n    passed: Whether the dataset passed all configured checks.",
      "properties": {
        "row_count": {
          "default": 0,
          "title": "Row Count",
          "type": "integer"
        },
        "column_count": {
          "default": 0,
          "title": "Column Count",
          "type": "integer"
        },
        "null_rates": {
          "additionalProperties": {
            "type": "number"
          },
          "title": "Null Rates",
          "type": "object"
        },
        "duplicate_rows": {
          "default": 0,
          "title": "Duplicate Rows",
          "type": "integer"
        },
        "pii_columns": {
          "items": {
            "type": "string"
          },
          "title": "Pii Columns",
          "type": "array"
        },
        "issues": {
          "items": {
            "type": "string"
          },
          "title": "Issues",
          "type": "array"
        },
        "passed": {
          "default": true,
          "title": "Passed",
          "type": "boolean"
        }
      },
      "title": "QualityReport",
      "type": "object"
    }
  },
  "description": "Summary of one ingestion run.\n\nAttributes:\n    source: The source URI/spec string.\n    collection: The vector collection chunks were written to (if any).\n    documents: Number of documents ingested.\n    chunks: Number of chunks produced.\n    vectors_indexed: Number of vectors written to the store.\n    warehouse_table: The DuckDB table records were written to (if any).\n    records: Number of structured records written.\n    duration_s: Wall-clock duration.\n    quality: Optional data-quality report (tabular sources).\n    errors: Any non-fatal errors encountered.",
  "properties": {
    "source": {
      "title": "Source",
      "type": "string"
    },
    "collection": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Collection"
    },
    "documents": {
      "default": 0,
      "title": "Documents",
      "type": "integer"
    },
    "chunks": {
      "default": 0,
      "title": "Chunks",
      "type": "integer"
    },
    "vectors_indexed": {
      "default": 0,
      "title": "Vectors Indexed",
      "type": "integer"
    },
    "warehouse_table": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Warehouse Table"
    },
    "records": {
      "default": 0,
      "title": "Records",
      "type": "integer"
    },
    "duration_s": {
      "default": 0.0,
      "title": "Duration S",
      "type": "number"
    },
    "quality": {
      "anyOf": [
        {
          "$ref": "#/$defs/QualityReport"
        },
        {
          "type": "null"
        }
      ],
      "default": null
    },
    "errors": {
      "items": {
        "type": "string"
      },
      "title": "Errors",
      "type": "array"
    }
  },
  "required": [
    "source"
  ],
  "title": "IngestionResult",
  "type": "object"
}
