Skip to content

Instantly share code, notes, and snippets.

@crcastle
Created December 8, 2017 20:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save crcastle/9b6512564c9660cbfac8420833253644 to your computer and use it in GitHub Desktop.
Save crcastle/9b6512564c9660cbfac8420833253644 to your computer and use it in GitHub Desktop.
kafka-streams-test word count
  ~/src/kafka-streams-on-heroku  master 🌷  59s
👉 h kafka:topics:write tombigbee-17823.textlines "the quick brown fox jumps over the lazy dog" -a kafka-streams-test
  ~/src/kafka-streams-on-heroku  master 🌷 
👉 heroku pg:psql -c 'select * from windowed_counts' HEROKU_POSTGRESQL_URL -a kafka-streams-test
--> Connecting to postgresql-vertical-36453
┌────┬───────────────┬───────┬───────┐
│ id │ time_window │ word │ count │
├────┼───────────────┼───────┼───────┤
│ 21 │ 1512765050000 │ brown │ 1 │
│ 22 │ 1512765050000 │ jumps │ 1 │
│ 23 │ 1512765050000 │ over │ 1 │
│ 24 │ 1512765050000 │ the │ 1 │
│ 25 │ 1512765050000 │ the │ 2 │
│ 26 │ 1512765050000 │ dog │ 1 │
│ 27 │ 1512765050000 │ fox │ 1 │
│ 28 │ 1512765050000 │ lazy │ 1 │
│ 29 │ 1512765050000 │ quick │ 1 │
└────┴───────────────┴───────┴───────┘
(9 rows)
Time: 68.519 ms
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment