Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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