audit-dim-joins

Audit dimension join accuracy and surface unmatched codes via psql.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/josca42/varro --skill audit-dim-joins
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: audit-dim-joins
Source: https://github.com/josca42/varro/tree/main/.claude/archive/audit-dim-joins
Command: npx skills add https://github.com/josca42/varro --skill audit-dim-joins

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Validate and annotate the joins between fact and dimension tables to ensure accurate aggregations, surface join gaps, and provide actionable notes for per-table and subject-level documentation.

Core Features & Use Cases

  • Detect and rate the accuracy of dimension joins for a given fact table.
  • Surface unmatched codes, join gaps, and potential hierarchy level issues to guide remediation.
  • Integrate with the audit CLI (audit-dim-joins.py) and encourage validation via psql, alongside generating notes for both fact docs and subject docs.
  • Support iterative improvements by updating dimension_links or notes based on audit findings.

Quick Start

Run the audit on a subject with uv run python scripts/audit_dim_joins.py audit-subject <subject_path> to generate match rates and notes.

Frequently Asked Questions about audit-dim-joins

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I audit dimension joins in PostgreSQL to find unmatched codes?

To audit dimension joins in PostgreSQL, read your subject docs and run the audit CLI script against a fact table to calculate match rates and surface unmatched codes. The tool validates joins using psql and appends the audit results as per-table notes.

What are dimension join gaps and when do they affect data quality?

Dimension join gaps occur when fact table records lack matching dimension entries, leading to inaccurate aggregations. They affect data quality by dropping unmatched rows or misattributing metrics, requiring an audit workflow to detect match rates and annotate the gaps for remediation.

How do I validate fact table match rates using psql?

You validate fact table match rates using psql by running the provided Python audit script which executes psql commands to compare fact and dimension tables. The script calculates match rates, identifies unmatched codes, and outputs the results for your subject notes.

Can I run an audit across an entire subject instead of one table at a time?

Yes, you can run an audit across an entire subject by executing the script with the audit-subject parameter and passing the subject path. This generates overall match rates and summary notes for all fact tables within that subject directory.

What is the best way to document dimension join issues for data ops teams?

The best way to document dimension join issues is to append practical audit notes directly to per-table docs and summarize them at the subject level. This workflow ensures data ops teams can iteratively update dimension links and notes based on detected join gaps.

Why are my PostgreSQL fact table aggregations inaccurate despite no SQL errors?

Inaccurate aggregations without SQL errors often stem from silent dimension join gaps where fact rows have unmatched dimension codes. Running an audit script to determine match rates and identify unmatched codes will surface these hidden hierarchy level issues.