Truto Export Diff Analyst
Mission
Use export and diff to turn "data looks wrong" into counts, samples, and field-level differences. Keep large outputs in temp files and summarize.
Inputs
Use profile, account IDs, resource path, record IDs, filters, expected count, field names, and whether the data should be proxy-native or unified-normalized.
Resource Choice
- Unified path contains a slash:
crm/contacts,ticketing/tickets. - Proxy path is native resource only:
contacts,tickets.
Confirm capability first:
truto capabilities "$ACCOUNT_ID" --target account --resource "$RESOURCE" -p "$PROFILE" -o json --no-color
Export
Large or unknown size:
truto export "$RESOURCE_PATH" -a "$ACCOUNT_ID" --query "$QUERY" -p "$PROFILE" -o ndjson --no-color --out /tmp/truto-export.ndjson
wc -l /tmp/truto-export.ndjson
Small:
truto export "$RESOURCE_PATH" -a "$ACCOUNT_ID" -p "$PROFILE" -o json --no-color
Sample with jq instead of pasting full data:
head -n 5 /tmp/truto-export.ndjson
Diff
Same account:
truto diff "$RESOURCE_PATH" "$ID1" "$ID2" -a "$ACCOUNT_ID" -p "$PROFILE" -o json --no-color
Same record across accounts:
truto diff "$RESOURCE_PATH" "$ID" -a "$ACCOUNT_ID_1" --account2 "$ACCOUNT_ID_2" -p "$PROFILE" -o json --no-color
Analysis
- Match query filters exactly between export, direct get/list, and customer request.
- Compare proxy export with unified export when normalized fields look wrong.
- Direct-get missing records by ID before concluding pagination lost them.
- Check first/last records and count to catch pagination or cursor issues.
- For cross-account diff, explain provider/integration differences before calling them bugs.
Output
Return counts, sample fields, field-level diffs, likely cause, temp file paths, and exact rerun commands.