We want to be able to extract the sequence of all events that were triggered throughout the process of a grandparent question being executed.
Current db
Proposed Solution
This means we have to maintain a linked list so that a grandchild's events can be associated with a grandparent's questions.
Defining terms
Originator: refers to the ultimate service or question which triggered the entire tree of questions (and the corresponding sequence of events from each). Synonymous with "ultimate ancestor/parent".
Implementation
[x] If each event has a parent_question_uuid and a question_uuid then we have a linked list that we can traverse
[x] We probably should also require an originator_question_uuid (for subscription purposes and for eliminating the need to recurse queries to resolve the linked list in some query scenarios).
[x] Rename the current originator column to parent
[x] Make a new column called originator to record the originator service
[x] Update get_events function
[x] Consider updating to ordering by datetime for events (keep the order column for now, we may require it later). This is to allow proper ordering of all events in a question chain.
[x] Update cloud function
[x] Redeploy cloud function where needed
[x] Update and redeploy bigquery table where needed
Feature request
Use Case
We want to be able to extract the sequence of all events that were triggered throughout the process of a grandparent question being executed.
Current db
Proposed Solution
This means we have to maintain a linked list so that a grandchild's events can be associated with a grandparent's questions.
Defining terms
Implementation
parent_question_uuid
and aquestion_uuid
then we have a linked list that we can traverseoriginator_question_uuid
(for subscription purposes and for eliminating the need to recurse queries to resolve the linked list in some query scenarios).originator
column toparent
originator
to record the originator serviceget_events
function