Query ID graph to analyze canonical ID group sizes. Use when debugging over-stitching by checking how many individual IDs are mapped to each canonical ID, or when canonical ID groups seem too large.
67
80%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
View guide
Passed
No findings from the security scan
Analyze canonical ID group sizes to identify over-stitching patterns where too many individual IDs are mapped to a single canonical ID.
The database name contains the parent segment ID and has this format cdp_audience_273509. This is where you can plug in the parent segment the user gives in the request.
The ID graph table is typically called ids_updated and is in the Parent Segment real time database. This table contains the canonical ID mappings created by RT 2.0's ID stitching process.
The ids_updated table has the following key columns:
The main query to analyze ID counts per canonical ID:
WITH flattened AS (
SELECT
canonical_id,
id_value
FROM cdp_audience_<parent_segment_id>.ids_updated
CROSS JOIN UNNEST(id_set) AS t(id_value)
WHERE td_interval(time, '-7d') -- Avoid full table scan
)
SELECT
canonical_id,
count(DISTINCT id_value) as unique_id_count
FROM flattened
GROUP BY canonical_id
ORDER BY unique_id_count DESC
LIMIT 100;1a0845f
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.