Skip to content

Commit 295a45d

Browse files
added categories descriptions (#45)
1 parent c4aa9c5 commit 295a45d

File tree

4 files changed

+26
-12
lines changed

4 files changed

+26
-12
lines changed

definitions/declarations/httparchive.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,10 @@ for (const table of stagingTables) {
88

99
declare({
1010
schema: 'wappalyzer',
11-
name: 'apps'
11+
name: 'technologies'
12+
})
13+
14+
declare({
15+
schema: 'wappalyzer',
16+
name: 'categories'
1217
})

definitions/output/reports/cwv_tech_categories.js

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,19 @@ WITH pages AS (
1616
client = 'mobile'
1717
${constants.devRankFilter}
1818
), categories AS (
19+
SELECT
20+
name AS category,
21+
description
22+
FROM ${ctx.ref('wappalyzer', 'categories')}
23+
), category_stats AS (
1924
SELECT
2025
category,
2126
COUNT(DISTINCT root_page) AS origins
2227
FROM pages,
2328
UNNEST(technologies) AS t,
2429
UNNEST(t.categories) AS category
2530
GROUP BY category
26-
), technologies AS (
31+
), technology_stats AS (
2732
SELECT
2833
category,
2934
technology,
@@ -38,13 +43,17 @@ WITH pages AS (
3843
3944
SELECT
4045
category,
41-
categories.origins,
42-
ARRAY_AGG(technology IGNORE NULLS ORDER BY technologies.origins DESC) AS technologies
43-
FROM categories
44-
JOIN technologies
46+
description,
47+
category_stats.origins,
48+
ARRAY_AGG(technology IGNORE NULLS ORDER BY technology_stats.origins DESC) AS technologies
49+
FROM category_stats
50+
INNER JOIN technology_stats
51+
USING (category)
52+
LEFT JOIN categories
4553
USING (category)
4654
GROUP BY
4755
category,
48-
categories.origins
49-
ORDER BY categories.origins DESC
56+
description,
57+
origins
58+
ORDER BY origins DESC
5059
`)

definitions/output/reports/cwv_tech_technologies.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ SELECT
1515
NULL AS similar_technologies,
1616
origins
1717
FROM ${ctx.ref('core_web_vitals', 'technologies')}
18-
LEFT JOIN ${ctx.ref('wappalyzer', 'apps')}
18+
LEFT JOIN ${ctx.ref('wappalyzer', 'technologies')}
1919
ON app = name
2020
WHERE date = '${pastMonth}' AND
2121
geo = 'ALL' AND

definitions/output/wappalyzer/tech_detections.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ tech_deprecated_gone_origins AS (
112112
-- aggregation of technology adoption/deprecation metrics
113113
SELECT
114114
DATE('${constants.currentMonth}') AS date,
115-
COALESCE(before_summary.technology, tech_adopted_existing_origins.technology, tech_adopted_new_origins.technology, apps.name) AS technology,
115+
COALESCE(before_summary.technology, tech_adopted_existing_origins.technology, tech_adopted_new_origins.technology, technologies.name) AS technology,
116116
117117
-- origins summary
118118
0-COALESCE(total_origins_deprecated_existing, 0) AS total_origins_deprecated_existing,
@@ -139,6 +139,6 @@ LEFT JOIN tech_deprecated_existing_origins
139139
ON before_summary.technology = tech_deprecated_existing_origins.technology
140140
LEFT JOIN tech_deprecated_gone_origins
141141
ON before_summary.technology = tech_deprecated_gone_origins.technology
142-
FULL OUTER JOIN wappalyzer.apps
143-
ON before_summary.technology = apps.name
142+
FULL OUTER JOIN wappalyzer.technologies
143+
ON before_summary.technology = technologies.name
144144
`)

0 commit comments

Comments
 (0)