How can I periodically write a ticking table to disk?
It's common to have queries on ticking tables where it's prudent to write that data to disk periodically. There are a few ways to do this.
Python timers
There are several ways to periodically call functions in Python. The following example uses Python's threading.Timer to write a ticking table to disk every 30 seconds.
Time table
You can also just use a time table to trigger writes. For instance, if you want to write every 30 seconds, have a time table tick every 30 seconds and call a Python function that writes the ticking table of interest to disk.