Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into balanced-owl
Browse files Browse the repository at this point in the history
  • Loading branch information
max-ostapenko committed Jan 20, 2025
2 parents 861376a + 295a45d commit b1812df
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 13 deletions.
7 changes: 6 additions & 1 deletion definitions/declarations/httparchive.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,10 @@ for (const table of stagingTables) {

declare({
schema: 'wappalyzer',
name: 'apps'
name: 'technologies'
})

declare({
schema: 'wappalyzer',
name: 'categories'
})
24 changes: 16 additions & 8 deletions definitions/output/reports/cwv_tech_categories.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,12 @@ WITH pages AS (
WHERE
date = '${pastMonth}'
${constants.devRankFilter}
),
categories AS (
), categories AS (
SELECT
name AS category,
description
FROM ${ctx.ref('wappalyzer', 'categories')}
), category_stats AS (
SELECT
client,
category,
Expand All @@ -30,7 +33,7 @@ categories AS (
category
),
technologies AS (
technology_stats AS (
SELECT
category,
technology,
Expand All @@ -43,15 +46,20 @@ technologies AS (
SELECT
category,
description,
STRUCT(
COALESCE(MAX(IF(categories.client = 'desktop', categories.origins, 0))) AS desktop,
COALESCE(MAX(IF(categories.client = 'mobile', categories.origins, 0))) AS mobile
) AS origins,
ARRAY_AGG(technology IGNORE NULLS ORDER BY total_origins DESC) AS technologies
FROM categories
INNER JOIN technologies
ARRAY_AGG(technology IGNORE NULLS ORDER BY technology_stats.origins DESC) AS technologies
FROM category_stats
INNER JOIN technology_stats
USING (category)
LEFT JOIN categories
USING (category)
GROUP BY
category
category,
description,
origins
ORDER BY category ASC
`)
2 changes: 1 addition & 1 deletion definitions/output/reports/cwv_tech_technologies.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ SELECT
NULL AS similar_technologies,
origins
FROM ${ctx.ref('core_web_vitals', 'technologies')}
LEFT JOIN ${ctx.ref('wappalyzer', 'apps')}
LEFT JOIN ${ctx.ref('wappalyzer', 'technologies')}
ON app = name
WHERE date = '${pastMonth}' AND
geo = 'ALL' AND
Expand Down
6 changes: 3 additions & 3 deletions definitions/output/wappalyzer/tech_detections.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ tech_deprecated_gone_origins AS (
-- aggregation of technology adoption/deprecation metrics
SELECT
DATE('${constants.currentMonth}') AS date,
COALESCE(before_summary.technology, tech_adopted_existing_origins.technology, tech_adopted_new_origins.technology, apps.name) AS technology,
COALESCE(before_summary.technology, tech_adopted_existing_origins.technology, tech_adopted_new_origins.technology, technologies.name) AS technology,
-- origins summary
0-COALESCE(total_origins_deprecated_existing, 0) AS total_origins_deprecated_existing,
Expand All @@ -139,6 +139,6 @@ LEFT JOIN tech_deprecated_existing_origins
ON before_summary.technology = tech_deprecated_existing_origins.technology
LEFT JOIN tech_deprecated_gone_origins
ON before_summary.technology = tech_deprecated_gone_origins.technology
FULL OUTER JOIN wappalyzer.apps
ON before_summary.technology = apps.name
FULL OUTER JOIN wappalyzer.technologies
ON before_summary.technology = technologies.name
`)

0 comments on commit b1812df

Please sign in to comment.