chatbot
chatbot copied to clipboard
Add analytics views on scrubbed_messages
Notes
- For use in reporting dashboard - rather than duplicating aggregation pipelines in the Charts UI we can pull from these views.
We don't really have anything set up to test view creation. Ultimately it's not mission critical if these break - we'll just notice that our charts aren't working.
@mongodben I modified this to be a materialized view instead of an on-demand view. i.e. this is now an aggregation pipeline ending with a $merge that we run from a cron job. I think this will be a good base for any type of aggregated analytics we do in the future.
This shaves off ~50 seconds (currently, more over time) of aggregation query time any time we load/refresh/modify a chart. Basically we'll trade off a bit of software complexity & data that's up to 2 hours old in exchange for tons of time and compute.
Happy to walk through this during standup, probably easier to just point everything out.
Happy to walk through this during standup, probably easier to just point everything out.
yes pls. maybe we can today?