Suppose a Contact Form 7 intake export has 230 inquiry IDs and the CRM export includes 229 source inquiry IDs. The difference of one tells you almost nothing about the exact matches. One file may have a duplicate, another may contain an inquiry from a previous period, and a third class of rows may have no usable identifier at all. An audit needs a join that keeps exceptions visible and a cardinality check that prevents multiplying records.

Compare by the source of truth for keys
| Product | Where it fits | Audit approach | Core license |
|---|---|---|---|
| pandas | Python notebook or batch script | Outer merge with indicator and validation | BSD-3-Clause |
| Polars | Typed DataFrame pipeline | Full and anti joins with explicit null policy | MIT for the core |
| DuckDB | SQL over staged exports | Full outer join and explicit grouped checks | MIT for the core |
| data.table | R script with concise keyed lookups | Explicit joins and control over multiplication | MPL-2.0 |
| dplyr | R reporting in tidyverse | Readable join contracts and mismatch extracts | MIT for the core |
The projects in this table have no paid plan requirement for the local core workflow described here. Compute, storage and separately offered hosted services may cost extra. The comparison assumes you already obtained authorized CSV, Parquet or other supported staged data from your intake and CRM. No direct CF7 connector is implied.
Start with an audit whose answer you know
Create a tiny fixture. Intake has A01, A02 and A03. CRM has A01, A02 and A04. At one row per non-null inquiry key on each side, expect two matched keys, one intake-only key and one CRM-only key. Then add a second CRM row for A02. The audit should flag duplicates and stop before publishing one-to-one totals. Finally add an empty identifier to both sides and make sure it never becomes a matched lead. Preserve a labeled row count even if the matching phase excludes it.
pandas
pandas has a direct audit workflow: an outer merge exposes both sides, indicator=True adds membership labels, and validate="one_to_one" checks the two keys for uniqueness. This is a good fit for an analyst who already reviews Python DataFrames and wants to inspect mismatches as a separate table. Declare the two key column types on import so an identifier such as 0012 remains text.
pandas can match null keys on opposite sides, unlike an ordinary SQL equality join. Set unresolved keys aside before merging. That detail is easy to miss when testing with clean CSVs. Review suffixes and explicitly name the retained key if the sources use different column names. For a large export, measure peak memory in your own job because the merge and its result need to fit the workflow.
Keep the indicator table and aggregate it by source membership. Produce a separate mismatch extract with keys and timestamps only. If validation raises an error, resolve duplicates or revise the grain before releasing the report.
Polars
Polars can express a full join for an audit or anti joins for records found on only one side. The DataFrame join API exposes validate for supported execution paths and has a nulls_equal option. Nulls are unequal by default. Specify key types, how to coalesce key columns, and any ordering that consumers depend on instead of relying on observed defaults.
It suits teams already loading weekly Parquet snapshots or building a typed DataFrame pipeline. Keep narrow inputs with only the fields required by the audit; independently track malformed or missing IDs. If the full join keeps two keys, generate a single display key for the audit only after preserving the original source columns for diagnosis.
Check join validation against the engine used by the job; the API documents a streaming limitation for validation. A separate duplicate-key check per input travels well between execution modes. Compare the exact fixture output and actual resource use when changing how the report runs.
DuckDB
DuckDB supports ordinary SQL joins and can run a short audit over tables loaded from files. Start with a grouped duplicate count and null checks per input, then use a full outer join with explicit columns. Non-null source row markers distinguish left-only rows from right-only ones if optional data fields are empty. The SQL makes the cardinality assumptions visible to reviewers.
Use it when existing analysts prefer SQL and the task lives with file snapshots or an embedded analytics database. Keep a saved query for the audit and another for report aggregates. Explicitly type the import key as text, since inferring numbers from an export can remove leading zeros long before the join.
An ordinary SQL equality comparison does not match nulls; do not change this with a null-safe comparison unless the business meaning requires it. The simple join does not itself fail when keys repeat. Use intentional prechecks or a staging constraint, and review the actual output order if later steps expect a stable sequence.
data.table
The data.table join vignette describes joins with bracket syntax as well as merging tables. A report can use a full merge for visibility or perform anti-join checks for each input. Choose the join columns explicitly, and name the input roles in comments or small functions so another maintainer can tell which table supplies rows and which supplies matches.
It fits a team whose R reporting already relies on data.table and wants to avoid a new execution path. Compute duplicates per key before the join. Protection against some large Cartesian results is useful, but a modest level of unintended row multiplication can still damage counts. A domain-specific uniqueness check is clearer than depending on a row limit.
Missing values can match in data.table joins. Put blank and missing identities in a separate ledger up front. In the shared fixture, verify two matched keys and one unmatched key per side before adding status columns, and check that the join direction did not quietly remove the intake-only row.
dplyr
dplyr offers full_join() and filtering joins with a readable join_by() specification. For local data frames, a production relationship such as relationship = "one-to-one" can make unexpected multiple matches an error. Use an explicit missing-value policy such as na_matches = "never" or keep those rows outside the join.
Choose dplyr if the team publishes R reports and wants reviewers to read each transformation in order. Separate unmatched rows with anti joins and report the matched rows from the reconciliation. A knitted report can render a small methods paragraph from the same configuration that selected the keys.
The relationship check concerns matches. If uniqueness across the whole input matters, check each side separately, including duplicate keys that have no partner. Verify availability and translation if code later moves to a backend through dbplyr; a data-frame method and a remote backend can support different arguments.
Make the handoff actionable
Classify matched, intake-only, CRM-only, duplicate-key, and unusable-key records. Keep comparison windows and export watermarks in the receipt. An intake-only row could be delayed or held for review; missing from an export does not prove a submission failed. Return to the integration ledger to find the last confirmed step, and compare your audit to the CRM partial-success workflow before replaying requests. Never replay every mismatch without identifying the source and checking destination state.
Some relationships legitimately have multiple records per key, such as several CRM activities per inquiry. If the report wants one row per intake record, aggregate destination activity to that grain first, or select a documented representative using a stable tie breaker. Keep the event-level data for another report. Use the export validation comparison for single-file checks before handing inputs to the join.
Before sharing, record input counts, rejected keys, match counts, and the code or query version. Share only aggregates with general audiences and retain row-level mismatch evidence under the permissions used for the input exports. Put a human owner on each unresolved class. A reconciliation that cannot change decisions is just another copy of the exports.
Choose by how your team reviews the same result
Use pandas for notebook-driven audits, Polars for a typed DataFrame pipeline, DuckDB when a small SQL script is the easiest to review, data.table in existing keyed R work, and dplyr when join contracts should read clearly in a tidyverse script. Run the same small fixture in each candidate of interest and log whether it caught all three classes of error. Measure runtime and peak memory only with representative data in your environment.
Review the unique-leads counting guide after you have reconciled submissions and contacts. Our free Svetlik Analytics for Contact Form 7 plugin can provide a WordPress-side submission trend; the export joins here are a separate reconciliation job.
