Skip to content

Commit 1f6ca86

Browse files
committed
piped sql
1 parent 39031ba commit 1f6ca86

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

hercules-packages/bluesky/1.0.yaml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
name: bluesky
22
version: 1.0
33

4+
extensions:
5+
community:
6+
- name: psql
7+
48
sources:
59
- name: profile
610
type: sql
@@ -16,7 +20,8 @@ sources:
1620

1721
- name: jetstream
1822
type: sql
19-
source: select * from read_parquet('https://hive.buz.dev/bluesky/jetstream/latest.parquet');
23+
# source: select * from read_parquet('https://hive.buz.dev/bluesky/jetstream/latest.parquet');
24+
source: select * from read_parquet('jetstream.parquet');
2025
materialize: true
2126
refreshIntervalSeconds: 600
2227

@@ -143,7 +148,7 @@ metrics:
143148

144149
- name: jetstream_posts_per_minute_bucket
145150
help: Quantiles of posts per minute
146-
sql: select date_trunc('minute', make_timestamp(time_us)), count(*) from jetstream where commit.collection = 'app.bsky.feed.post' and commit.operation = 'create' group by 1;
151+
sql: from jetstream |> select date_trunc('minute', make_timestamp(time_us)), count(*) where commit.collection = 'app.bsky.feed.post' and commit.operation = 'create' group by 1;
147152
objectives:
148153
- 0.5
149154
- 0.9

0 commit comments

Comments
 (0)