1

I understood how to insert data inside the tables, but then how can i access it?

enter image description here

How can i print on screen the data inside 'order_count'?

SimAzz
  • 138
  • 2
  • 14
  • Welcome to Stack Overflow. Please take the [tour] to learn how Stack Overflow works and read [ask] on how to improve the quality of your question. [Please do not upload images of code/errors when asking a question.](https://meta.stackoverflow.com/q/285551) – Progman May 06 '22 at 20:53

1 Answers1

1

how can i access it?

For reading, order_count_by_account can be treated like a dictionary and used by as many workers as you'd like.

If you want to have this table persist on your filesystem, assuming you have RocksDB and its dependencies installed, you'll want to initialize your Faust app via:

app = faust.App('hello-app', broker='kafka://localhost', store=rocksdb://')

The database file will be stored in your current directory under /hello-app-data/v1/tables/order_count-0.db

How can i print on screen the data inside 'order_count'?

There's a method defined for Table objects that displays tables in a nice format. You can see an example of this defined in one of Faust's examples, tabletest.py.

wbarnha
  • 127
  • 7