Skip to content

Commit 2fe97e5

Browse files
authored
fix: include community collections in collectionsSlugs (IN-1195) (#4360)
Signed-off-by: Gašper Grom <gasper.grom@gmail.com>
1 parent 70a96d7 commit 2fe97e5

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

services/libs/tinybird/pipes/insights_projects_populated_copy.pipe

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,18 @@
11
NODE insights_projects_populated_copy_collections_slugs
22
DESCRIPTION >
3-
Returns collection slugs per project
3+
Returns collection slugs per project, for both curated (ssoUserId IS NULL) and
4+
community (ssoUserId IS NOT NULL) collections. Community collections were previously
5+
excluded here, which left their slugs out of collectionsSlugs and caused
6+
collection_insights_aggregate to report 0 contributors / no health for them (IN-1195).
7+
Downstream leaderboard/insightsProjects_filtered pipes only apply the collectionsSlugs
8+
filter when an explicit collectionSlug param is passed, so including community slugs does
9+
not change any un-scoped listing.
410

511
SQL >
612
SELECT cip.insightsProjectId, groupArray(c.slug) AS "collectionsSlugs"
713
FROM collectionsInsightsProjects cip FINAL
814
JOIN collections c FINAL ON c.id = cip.collectionId
9-
WHERE isNull (c.deletedAt) AND isNull (c.ssoUserId) AND isNull (cip.deletedAt)
15+
WHERE isNull (c.deletedAt) AND isNull (cip.deletedAt)
1016
GROUP BY cip.insightsProjectId
1117

1218
NODE insights_projects_populated_copy_segment_id_mapping

0 commit comments

Comments
 (0)