11DESCRIPTION >
22 - `ai_code_tracker_copy.pipe` materializes AI-assisted commit counts into `ai_code_tracker_ds`.
3- - Runs daily to scan `activities_deduplicated_ds` for commits matching AI tool patterns .
3+ - Runs daily (after commits copy) reading from `ai_code_tracker_commits_ds` (only commits, not all 1B+ activities) .
44 - Classifies commits by AI tool based on title, body, and attributes content.
55 - Stores monthly aggregates per tool plus total commits per month (toolKey = '__total__').
66 - Uses multiSearchAnyCaseInsensitive for fast single-pass pre-filtering before classification.
@@ -9,34 +9,30 @@ TAGS "Report"
99
1010NODE ai_code_tracker_copy_totals
1111DESCRIPTION >
12- Total commits per month - no LIKE scanning needed, just a simple count
12+ Total commits per month - simple count, no string scanning
1313SQL >
1414 SELECT
15- toStartOfMonth(a. timestamp) AS monthStart,
15+ toStartOfMonth(timestamp) AS monthStart,
1616 '__total__' AS toolKey,
1717 count() AS commitCount
18- FROM activities_deduplicated_ds a
19- WHERE a.type = 'authored-commit'
18+ FROM ai_code_tracker_commits_ds
2019 GROUP BY monthStart
2120
2221NODE ai_code_tracker_copy_prefilter
2322DESCRIPTION >
24- Fast pre-filter: only keep commits that contain ANY AI keyword in title, body, or attributes .
25- multiSearchAnyCaseInsensitive does a single pass instead of dozens of separate LIKE checks.
23+ Fast pre-filter: only keep commits containing ANY AI keyword.
24+ multiSearchAnyCaseInsensitive does a single pass instead of dozens of separate checks.
2625SQL >
2726 SELECT
28- toStartOfMonth(a. timestamp) AS monthStart,
29- a. title,
30- a. body,
31- a. attributes
32- FROM activities_deduplicated_ds a
27+ toStartOfMonth(timestamp) AS monthStart,
28+ title,
29+ body,
30+ attributes
31+ FROM ai_code_tracker_commits_ds
3332 WHERE
34- a.type = 'authored-commit'
35- AND (
36- multiSearchAnyCaseInsensitive(a.title, ['copilot', 'chatgpt', 'claude', 'cursor', 'codewhisperer', 'gemini', 'codeium', 'aider', 'devin', 'tabnine', 'ai-generated', 'ai generated']) != 0
37- OR multiSearchAnyCaseInsensitive(a.body, ['copilot', 'chatgpt', 'claude', 'cursor', 'codewhisperer', 'gemini', 'codeium', 'aider', 'devin', 'tabnine', 'ai-generated', 'ai generated', 'co-authored-by']) != 0
38- OR multiSearchAnyCaseInsensitive(a.attributes, ['copilot', 'ai-generated']) != 0
39- )
33+ multiSearchAnyCaseInsensitive(title, ['copilot', 'chatgpt', 'claude', 'cursor', 'codewhisperer', 'gemini', 'codeium', 'aider', 'devin', 'tabnine', 'ai-generated', 'ai generated']) != 0
34+ OR multiSearchAnyCaseInsensitive(body, ['copilot', 'chatgpt', 'claude', 'cursor', 'codewhisperer', 'gemini', 'codeium', 'aider', 'devin', 'tabnine', 'ai-generated', 'ai generated', 'co-authored-by']) != 0
35+ OR multiSearchAnyCaseInsensitive(attributes, ['copilot', 'ai-generated']) != 0
4036
4137NODE ai_code_tracker_copy_classify
4238DESCRIPTION >
4541 SELECT
4642 monthStart,
4743 multiIf(
48- positionCaseInsensitive(title, 'github copilot') > 0 OR positionCaseInsensitive(body, 'co-authored-by') > 0 AND positionCaseInsensitive(body, 'copilot') > 0 OR positionCaseInsensitive(attributes, 'copilot') > 0, 'github-copilot',
44+ positionCaseInsensitive(title, 'github copilot') > 0 OR ( positionCaseInsensitive(body, 'co-authored-by') > 0 AND positionCaseInsensitive(body, 'copilot') > 0) OR positionCaseInsensitive(attributes, 'copilot') > 0, 'github-copilot',
4945 positionCaseInsensitive(title, 'cursor') > 0 OR positionCaseInsensitive(body, 'cursor') > 0, 'cursor',
5046 positionCaseInsensitive(title, 'claude') > 0 OR positionCaseInsensitive(body, 'claude') > 0, 'claude',
5147 positionCaseInsensitive(title, 'chatgpt') > 0 OR positionCaseInsensitive(body, 'chatgpt') > 0, 'chatgpt',
0 commit comments