dq_check_relationship
Validate join relationships before relying on them by detecting orphaned child keys, NULL foreign keys, and non-unique parent keys that cause dropped rows or inflated totals.
Instructions
Test a join before trusting it: orphaned child keys (rows an INNER JOIN silently drops), NULL foreign keys, and a non-unique parent key (which makes a LEFT JOIN fan out and inflate totals).
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"child_table": "<child_table>",
"child_key": "<child_key>",
"parent_table": "<parent_table>",
"parent_key": "<parent_key>"
},
"name": "dq_check_relationship"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sample | No | ||
| child_key | Yes | Foreign key column in the child table, e.g. orders.customer_id. | |
| parent_key | Yes | Key column in the parent table, e.g. customers.customer_id. | |
| child_table | Yes | Table name from dq_list_sources, e.g. 'orders' or 'warehouse.main.orders'. | |
| parent_table | Yes | Table name from dq_list_sources, e.g. 'orders' or 'warehouse.main.orders'. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||