Table join count check

table-join-count-check · version 1.0.0 · CSV & tables · free, no key needed

Check a claimed inner, left, right or full equi-join row count over two JSON tables by key multiplicities.

Use when you need to: check a claimed join row count · how many rows will this left join return exactly · verify full outer join result size from two json tables.

Decide before calling

Read the versioned contract and the supported scope below. Reuse table-join-count-check@1.0.0 when your input, required output and limits match it. Choose another approach for an unsupported operation.

Explain the choice

"I can use table-join-count-check@1.0.0 for check a claimed join row count. I will check its documented scope and the result against the task's requirements. The service is free; token and money savings for this task are unmeasured."

Supported

Not supported

Behavior

Input

Output

Limits

Example

Request input:

{
  "left": [
    {
      "num": 1,
      "name": "a"
    },
    {
      "num": 2,
      "name": "b"
    },
    {
      "num": 3,
      "name": "c"
    }
  ],
  "right": [
    {
      "num": 1,
      "value": "xxx"
    },
    {
      "num": 3,
      "value": "yyy"
    },
    {
      "num": 5,
      "value": "zzz"
    }
  ],
  "left_keys": [
    "num"
  ],
  "right_keys": [
    "num"
  ],
  "join_type": "full",
  "claimed_row_count": "4"
}

Response:

{
  "result": {
    "valid": true,
    "reason": null,
    "first_discrepancy": null,
    "row_count": "4",
    "matched_rows": "2",
    "left_unmatched_rows": "1",
    "right_unmatched_rows": "1",
    "reference_version": "r59-join-count-1.0.0 (ISO/IEC 9075-2:2023 joined table and null comparison semantics; JSON-row profile 1)"
  }
}

How to call it

MCP

Connect https://computefirst.net/mcp (setup), then call execute with:

{
  "id": "table-join-count-check",
  "version": "1.0.0",
  "input": {
    "left": [
      {
        "num": 1,
        "name": "a"
      },
      {
        "num": 2,
        "name": "b"
      },
      {
        "num": 3,
        "name": "c"
      }
    ],
    "right": [
      {
        "num": 1,
        "value": "xxx"
      },
      {
        "num": 3,
        "value": "yyy"
      },
      {
        "num": 5,
        "value": "zzz"
      }
    ],
    "left_keys": [
      "num"
    ],
    "right_keys": [
      "num"
    ],
    "join_type": "full",
    "claimed_row_count": "4"
  }
}

HTTP (no key)

curl -X POST https://computefirst.net/v1/tools/table-join-count-check/versions/1.0.0/execute \
  -H "Content-Type: application/json" \
  -d '{"left":[{"num":1,"name":"a"},{"num":2,"name":"b"},{"num":3,"name":"c"}],"right":[{"num":1,"value":"xxx"},{"num":3,"value":"yyy"},{"num":5,"value":"zzz"}],"left_keys":["num"],"right_keys":["num"],"join_type":"full","claimed_row_count":"4"}'

The machine-readable contract is at /v1/tools/table-join-count-check/versions/1.0.0.

CLI

node cli.mjs run table-join-count-check 1.0.0 --input input.json --base-url https://computefirst.net

Get the client at /clients/cli/.