'Faust - How to visualize data inside tables?

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'?



Solution 1:[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.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 wbarnha