{
  "summary": "6 of 6 keys unique, 6 of 6 relationships hold without orphans",
  "keys": [
    {
      "table": "customers",
      "columns": [
        "customer_id"
      ],
      "rule": "K2",
      "rows": 10,
      "nulls": 0,
      "distinct": 10,
      "verdict": "unique in all 10 rows"
    },
    {
      "table": "categories",
      "columns": [
        "id"
      ],
      "rule": "K2",
      "rows": 3,
      "nulls": 0,
      "distinct": 3,
      "verdict": "unique in all 3 rows"
    },
    {
      "table": "products",
      "columns": [
        "product_id"
      ],
      "rule": "K2",
      "rows": 8,
      "nulls": 0,
      "distinct": 8,
      "verdict": "unique in all 8 rows"
    },
    {
      "table": "addresses",
      "columns": [
        "address_id"
      ],
      "rule": "K2",
      "rows": 17,
      "nulls": 0,
      "distinct": 17,
      "verdict": "unique in all 17 rows"
    },
    {
      "table": "orders",
      "columns": [
        "order_id"
      ],
      "rule": "K2",
      "rows": 60,
      "nulls": 0,
      "distinct": 60,
      "verdict": "unique in all 60 rows"
    },
    {
      "table": "order_items",
      "columns": [
        "order_id",
        "line_no"
      ],
      "rule": "K1",
      "rows": 134,
      "nulls": 0,
      "distinct": 134,
      "verdict": "unique in all 134 rows"
    }
  ],
  "relationships": [
    {
      "source": "products",
      "columns": [
        "category_id"
      ],
      "target": "categories",
      "target_columns": [
        "id"
      ],
      "rule": "R1",
      "rows_with_value": 8,
      "orphans": 0,
      "verdict": "holds for all 8 rows with a value"
    },
    {
      "source": "addresses",
      "columns": [
        "customer_id"
      ],
      "target": "customers",
      "target_columns": [
        "customer_id"
      ],
      "rule": "R1",
      "rows_with_value": 17,
      "orphans": 0,
      "verdict": "holds for all 17 rows with a value"
    },
    {
      "source": "orders",
      "columns": [
        "customer_id"
      ],
      "target": "customers",
      "target_columns": [
        "customer_id"
      ],
      "rule": "R1",
      "rows_with_value": 60,
      "orphans": 0,
      "verdict": "holds for all 60 rows with a value"
    },
    {
      "source": "order_items",
      "columns": [
        "order_id"
      ],
      "target": "orders",
      "target_columns": [
        "order_id"
      ],
      "rule": "R1",
      "rows_with_value": 134,
      "orphans": 0,
      "verdict": "holds for all 134 rows with a value"
    },
    {
      "source": "order_items",
      "columns": [
        "product_id"
      ],
      "target": "products",
      "target_columns": [
        "product_id"
      ],
      "rule": "R1",
      "rows_with_value": 134,
      "orphans": 0,
      "verdict": "holds for all 134 rows with a value"
    },
    {
      "source": "audit_log",
      "columns": [
        "customer_id"
      ],
      "target": "customers",
      "target_columns": [
        "customer_id"
      ],
      "rule": "R1",
      "rows_with_value": 40,
      "orphans": 0,
      "verdict": "holds for all 40 rows with a value"
    }
  ],
  "note": "Counts over the whole tables at the moment of the call. They show the data agrees with the plan today; they do not prove the meaning, and new rows can change them.",
  "suggested_keys": [],
  "computed": "on the synthetic demo data (fabric_backend.seed.rows) in an in-memory SQLite database, with the same checks validate_plan runs on a Fabric source",
  "keys_given": {
    "order_items": [
      "order_id",
      "line_no"
    ]
  }
}