Skip to content

Commit cc2be05

Browse files
authored
feat: collection-scoped activity bucketing (#4410)
Signed-off-by: Gašper Grom <gasper.grom@gmail.com>
1 parent 2f50749 commit cc2be05

75 files changed

Lines changed: 2436 additions & 456 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
SCHEMA >
2+
`activityId` String,
3+
`conversationId` String,
4+
`createdAt` DateTime64(3),
5+
`updatedAt` DateTime64(3),
6+
`memberId` String,
7+
`objectMemberId` String,
8+
`objectMemberUsername` String,
9+
`organizationId` String,
10+
`parentId` String,
11+
`platform` LowCardinality(String),
12+
`segmentId` String,
13+
`username` String,
14+
`sourceId` String,
15+
`type` LowCardinality(String),
16+
`timestamp` DateTime64(3),
17+
`sourceParentId` String,
18+
`channel` String,
19+
`sentimentScore` Int8,
20+
`gitInsertions` UInt32,
21+
`gitDeletions` UInt32,
22+
`score` Int8,
23+
`isContribution` UInt8,
24+
`pullRequestReviewState` LowCardinality(String),
25+
`collectionSlug` String
26+
27+
ENGINE ReplacingMergeTree
28+
ENGINE_PARTITION_KEY toYear(createdAt)
29+
ENGINE_SORTING_KEY collectionSlug, segmentId, timestamp, type, platform, channel, sourceId
30+
ENGINE_VER updatedAt
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
SCHEMA >
2+
`activityId` String,
3+
`conversationId` String,
4+
`createdAt` DateTime64(3),
5+
`updatedAt` DateTime64(3),
6+
`memberId` String,
7+
`objectMemberId` String,
8+
`objectMemberUsername` String,
9+
`organizationId` String,
10+
`parentId` String,
11+
`platform` LowCardinality(String),
12+
`segmentId` String,
13+
`username` String,
14+
`sourceId` String,
15+
`type` LowCardinality(String),
16+
`timestamp` DateTime64(3),
17+
`sourceParentId` String,
18+
`channel` String,
19+
`sentimentScore` Int8,
20+
`gitInsertions` UInt32,
21+
`gitDeletions` UInt32,
22+
`score` Int8,
23+
`isContribution` UInt8,
24+
`pullRequestReviewState` LowCardinality(String),
25+
`collectionSlug` String
26+
27+
ENGINE ReplacingMergeTree
28+
ENGINE_PARTITION_KEY toYear(createdAt)
29+
ENGINE_SORTING_KEY collectionSlug, segmentId, timestamp, type, platform, channel, sourceId
30+
ENGINE_VER updatedAt
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
SCHEMA >
2+
`activityId` String,
3+
`conversationId` String,
4+
`createdAt` DateTime64(3),
5+
`updatedAt` DateTime64(3),
6+
`memberId` String,
7+
`objectMemberId` String,
8+
`objectMemberUsername` String,
9+
`organizationId` String,
10+
`parentId` String,
11+
`platform` LowCardinality(String),
12+
`segmentId` String,
13+
`username` String,
14+
`sourceId` String,
15+
`type` LowCardinality(String),
16+
`timestamp` DateTime64(3),
17+
`sourceParentId` String,
18+
`channel` String,
19+
`sentimentScore` Int8,
20+
`gitInsertions` UInt32,
21+
`gitDeletions` UInt32,
22+
`score` Int8,
23+
`isContribution` UInt8,
24+
`pullRequestReviewState` LowCardinality(String),
25+
`collectionSlug` String
26+
27+
ENGINE ReplacingMergeTree
28+
ENGINE_PARTITION_KEY toYear(createdAt)
29+
ENGINE_SORTING_KEY collectionSlug, segmentId, timestamp, type, platform, channel, sourceId
30+
ENGINE_VER updatedAt
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
SCHEMA >
2+
`activityId` String,
3+
`conversationId` String,
4+
`createdAt` DateTime64(3),
5+
`updatedAt` DateTime64(3),
6+
`memberId` String,
7+
`objectMemberId` String,
8+
`objectMemberUsername` String,
9+
`organizationId` String,
10+
`parentId` String,
11+
`platform` LowCardinality(String),
12+
`segmentId` String,
13+
`username` String,
14+
`sourceId` String,
15+
`type` LowCardinality(String),
16+
`timestamp` DateTime64(3),
17+
`sourceParentId` String,
18+
`channel` String,
19+
`sentimentScore` Int8,
20+
`gitInsertions` UInt32,
21+
`gitDeletions` UInt32,
22+
`score` Int8,
23+
`isContribution` UInt8,
24+
`pullRequestReviewState` LowCardinality(String),
25+
`collectionSlug` String
26+
27+
ENGINE ReplacingMergeTree
28+
ENGINE_PARTITION_KEY toYear(createdAt)
29+
ENGINE_SORTING_KEY collectionSlug, segmentId, timestamp, type, platform, channel, sourceId
30+
ENGINE_VER updatedAt
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
SCHEMA >
2+
`activityId` String,
3+
`conversationId` String,
4+
`createdAt` DateTime64(3),
5+
`updatedAt` DateTime64(3),
6+
`memberId` String,
7+
`objectMemberId` String,
8+
`objectMemberUsername` String,
9+
`organizationId` String,
10+
`parentId` String,
11+
`platform` LowCardinality(String),
12+
`segmentId` String,
13+
`username` String,
14+
`sourceId` String,
15+
`type` LowCardinality(String),
16+
`timestamp` DateTime64(3),
17+
`sourceParentId` String,
18+
`channel` String,
19+
`sentimentScore` Int8,
20+
`gitInsertions` UInt32,
21+
`gitDeletions` UInt32,
22+
`score` Int8,
23+
`isContribution` UInt8,
24+
`pullRequestReviewState` LowCardinality(String),
25+
`collectionSlug` String
26+
27+
ENGINE ReplacingMergeTree
28+
ENGINE_PARTITION_KEY toYear(createdAt)
29+
ENGINE_SORTING_KEY collectionSlug, segmentId, timestamp, type, platform, channel, sourceId
30+
ENGINE_VER updatedAt
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
SCHEMA >
2+
`activityId` String,
3+
`conversationId` String,
4+
`createdAt` DateTime64(3),
5+
`updatedAt` DateTime64(3),
6+
`memberId` String,
7+
`objectMemberId` String,
8+
`objectMemberUsername` String,
9+
`organizationId` String,
10+
`parentId` String,
11+
`platform` LowCardinality(String),
12+
`segmentId` String,
13+
`username` String,
14+
`sourceId` String,
15+
`type` LowCardinality(String),
16+
`timestamp` DateTime64(3),
17+
`sourceParentId` String,
18+
`channel` String,
19+
`sentimentScore` Int8,
20+
`gitInsertions` UInt32,
21+
`gitDeletions` UInt32,
22+
`score` Int8,
23+
`isContribution` UInt8,
24+
`pullRequestReviewState` LowCardinality(String),
25+
`collectionSlug` String
26+
27+
ENGINE ReplacingMergeTree
28+
ENGINE_PARTITION_KEY toYear(createdAt)
29+
ENGINE_SORTING_KEY collectionSlug, segmentId, timestamp, type, platform, channel, sourceId
30+
ENGINE_VER updatedAt
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
SCHEMA >
2+
`activityId` String,
3+
`conversationId` String,
4+
`createdAt` DateTime64(3),
5+
`updatedAt` DateTime64(3),
6+
`memberId` String,
7+
`objectMemberId` String,
8+
`objectMemberUsername` String,
9+
`organizationId` String,
10+
`parentId` String,
11+
`platform` LowCardinality(String),
12+
`segmentId` String,
13+
`username` String,
14+
`sourceId` String,
15+
`type` LowCardinality(String),
16+
`timestamp` DateTime64(3),
17+
`sourceParentId` String,
18+
`channel` String,
19+
`sentimentScore` Int8,
20+
`gitInsertions` UInt32,
21+
`gitDeletions` UInt32,
22+
`score` Int8,
23+
`isContribution` UInt8,
24+
`pullRequestReviewState` LowCardinality(String),
25+
`collectionSlug` String
26+
27+
ENGINE ReplacingMergeTree
28+
ENGINE_PARTITION_KEY toYear(createdAt)
29+
ENGINE_SORTING_KEY collectionSlug, segmentId, timestamp, type, platform, channel, sourceId
30+
ENGINE_VER updatedAt
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
SCHEMA >
2+
`activityId` String,
3+
`conversationId` String,
4+
`createdAt` DateTime64(3),
5+
`updatedAt` DateTime64(3),
6+
`memberId` String,
7+
`objectMemberId` String,
8+
`objectMemberUsername` String,
9+
`organizationId` String,
10+
`parentId` String,
11+
`platform` LowCardinality(String),
12+
`segmentId` String,
13+
`username` String,
14+
`sourceId` String,
15+
`type` LowCardinality(String),
16+
`timestamp` DateTime64(3),
17+
`sourceParentId` String,
18+
`channel` String,
19+
`sentimentScore` Int8,
20+
`gitInsertions` UInt32,
21+
`gitDeletions` UInt32,
22+
`score` Int8,
23+
`isContribution` UInt8,
24+
`pullRequestReviewState` LowCardinality(String),
25+
`collectionSlug` String
26+
27+
ENGINE ReplacingMergeTree
28+
ENGINE_PARTITION_KEY toYear(createdAt)
29+
ENGINE_SORTING_KEY collectionSlug, segmentId, timestamp, type, platform, channel, sourceId
30+
ENGINE_VER updatedAt
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
SCHEMA >
2+
`activityId` String,
3+
`conversationId` String,
4+
`createdAt` DateTime64(3),
5+
`updatedAt` DateTime64(3),
6+
`memberId` String,
7+
`objectMemberId` String,
8+
`objectMemberUsername` String,
9+
`organizationId` String,
10+
`parentId` String,
11+
`platform` LowCardinality(String),
12+
`segmentId` String,
13+
`username` String,
14+
`sourceId` String,
15+
`type` LowCardinality(String),
16+
`timestamp` DateTime64(3),
17+
`sourceParentId` String,
18+
`channel` String,
19+
`sentimentScore` Int8,
20+
`gitInsertions` UInt32,
21+
`gitDeletions` UInt32,
22+
`score` Int8,
23+
`isContribution` UInt8,
24+
`pullRequestReviewState` LowCardinality(String),
25+
`collectionSlug` String
26+
27+
ENGINE ReplacingMergeTree
28+
ENGINE_PARTITION_KEY toYear(createdAt)
29+
ENGINE_SORTING_KEY collectionSlug, segmentId, timestamp, type, platform, channel, sourceId
30+
ENGINE_VER updatedAt
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
SCHEMA >
2+
`activityId` String,
3+
`conversationId` String,
4+
`createdAt` DateTime64(3),
5+
`updatedAt` DateTime64(3),
6+
`memberId` String,
7+
`objectMemberId` String,
8+
`objectMemberUsername` String,
9+
`organizationId` String,
10+
`parentId` String,
11+
`platform` LowCardinality(String),
12+
`segmentId` String,
13+
`username` String,
14+
`sourceId` String,
15+
`type` LowCardinality(String),
16+
`timestamp` DateTime64(3),
17+
`sourceParentId` String,
18+
`channel` String,
19+
`sentimentScore` Int8,
20+
`gitInsertions` UInt32,
21+
`gitDeletions` UInt32,
22+
`score` Int8,
23+
`isContribution` UInt8,
24+
`pullRequestReviewState` LowCardinality(String),
25+
`collectionSlug` String
26+
27+
ENGINE ReplacingMergeTree
28+
ENGINE_PARTITION_KEY toYear(createdAt)
29+
ENGINE_SORTING_KEY collectionSlug, segmentId, timestamp, type, platform, channel, sourceId
30+
ENGINE_VER updatedAt

0 commit comments

Comments
 (0)