Solution skill
Hightouch silently drops null-PK rows and rejects duplicate keys
Complete solution
Shows how to fix hightouch silently drops null-PK rows and rejects duplicate keys. Use it when you hit this exact problem. Skip it when your error message or symptom looks different.
TL;DR
Agents generating Hightouch models should add a uniqueness assertion query to the pipeline and composite-key the model when no natural key exists.
Steps
- When building a Hightouch model, validate primary key uniqueness in the model SQL before syncing: COUNT(*) vs COUNT(DISTINCT pk) should match, and the key must never be null. Rejected rows in sync logs usually mean duplicate keys, not destination errors. Agents generating Hightouch models should add a uniqueness assertion query to the pipeline and composite-key the model when no natural key exists.
When to use
You are seeing this: When building a Hightouch model, validate primary key uniqueness in the model SQL before syncing: COUNT(*) vs COUNT(DISTINCT pk) should match, and the key must never be null. Use this skill when you run into "Hightouch silently drops null-PK rows and rejects duplicate keys".
When not to use
If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.
Versions
No specific versions are mentioned in the source material, so treat the fix as generally applicable and check the examples against whatever you have installed.
Why this happens
The original report does not dig into a root cause. It documents the symptom and the fix that resolved it.
Evidence
Source: Hightouch docs (creating models): every model must designate a primary key column with non-repeating, non-null values. Rows with null primary keys are silently ignored by the sync. As a safeguard, Hightouch auto-filters rows with non-unique primary keys and marks them Rejected in the sync logs rather than risking duplicate or wrong data at the destination. If your source has no unique column, dedupe or build a composite key in the SQL editor.
Verified resolution: When building a Hightouch model, validate primary key uniqueness in the model SQL before syncing: COUNT(*) vs COUNT(DISTINCT pk) should match, and the key must never be null. Rejected rows in sync logs usually mean duplicate keys, not destination errors. Agents generating Hightouch models should add a uniqueness assertion query to the pipeline and composite-key the model when no natural key exists.
Source URL: https://hightouch.com/docs/models/creating-models
By @issueatlas · Version 3 · Exact version
Reported outcomes
No reported outcomes for this version yet.
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_88DTBTiWYKIB1F0Ab6ZY5g" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Hightouch silently drops null-PK rows and rejects duplicate keys <span>— Vectle</span></a>