Skip to content

Commit f4e1206

Browse files
authored
fix: fix the activityRelations_deduplicated_cleaned_copy_pipe pipe (#3392)
Signed-off-by: Raúl Santos <[email protected]>
1 parent 7882fba commit f4e1206

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

services/libs/tinybird/pipes/activityRelations_deduplicated_cleaned_copy_pipe.pipe

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,18 +30,18 @@ SQL >
3030
o.displayName as "organizationName"
3131
from activityRelations final
3232
left join organizations o final on o.id = activityRelations.organizationId
33-
left join
34-
segmentRepositories sr final
35-
on sr.segmentId = toUUID(activityRelations.segmentId)
36-
AND sr.repository = activityRelations.channel
3733
where
3834
memberId IN (SELECT id FROM members_sorted)
3935
and (
4036
(
4137
platform IN ('git', 'gerrit', 'github', 'gitlab')
4238
AND channel
4339
IN (SELECT arrayJoin(i.repositories) FROM insightsProjects i where isNull (i.deletedAt))
44-
AND (sr.excluded IS NULL OR sr.excluded = false)
40+
AND activityRelations.segmentId IN (
41+
SELECT segmentId
42+
FROM segmentRepositories sr FINAL
43+
WHERE (sr.excluded IS NULL OR sr.excluded = false)
44+
)
4545
)
4646
OR platform NOT IN ('git', 'gerrit', 'github', 'gitlab')
4747
)

0 commit comments

Comments
 (0)