General separated statistics¶
Use this query to return an overview of Stitch statistics, separated by deduplication keys and tables. This query is split into two individual queries: OVERALL and TABLE.
Warning
Running both queries together may exhaust the resources in a large tenant. It is recommended to run just one query at a time.
Configure query¶
From the Queries page, open the Stitch QA folder, and then select this query.
Tip
Add the Stitch QA queries template folder if it does not already exist.
If customer keys are available, change the following line in the common table expression:
1WITH overall_dedupe_keys AS ( 2 SELECT DISTINCT 3 amperity_id 4 ,CONCAT(datasource, pk) AS dedupe_key 5 FROM Unified_Coalesced
to:
1WITH overall_dedupe_keys AS ( 2 SELECT DISTINCT 3 amperity_id 4 ,CONCAT(datasource, COALESCE(ck, pk)) AS dedupe_key 5 FROM Unified_Coalesced
and then change the following line in the table_dedupe_keys SELECT statement:
1WITH table_dedupe_keys AS ( 2 SELECT DISTINCT 3 datasource 4 ,amperity_id 5 ,pk AS dedupe_key 6 FROM Unified_Coalesced
to:
1WITH table_dedupe_keys AS ( 2 SELECT DISTINCT 3 datasource 4 ,amperity_id 5 ,COALESCE(ck, pk) AS dedupe_key 6 FROM Unified_Coalesced
Click Run Query and debug any issues that may arise.
Click Activate.