Hello Everyone! I’m hoping this is an easy question but it’s proving difficult for me and I’m definitely not understanding some things.
I have two collections:
-
telemetry - a time series collection with documents that have the format
…
{ metadata: { device_id: AABBCCDD }, ts: datetime, value: 0.1234}
… -
logs - a regular collection with documents that have the format
…
{ device_id: AABBCCDD, mesage: “a log message”, ts: datetime}
…
I would like to create a view called “status” that has three fields (device_id, last_telemetry_received and last_log_received) that updates whenever a log message or telemetry value is received. The idea is that instead of querying each collection individually to display the last timestamp value, I can query the status view.
My problems are two fold:
I don’t know how to create a view in Python and I don’t know how to create a pipeline that will take new data as it comes in to either collection and updates the view. I’m also having a heck of a time finding relevant documentation on merging multiple collections. Any links would be appreciated.
Thanks!