Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make Question chains easily extractible from BigQuery Event Store #649

Open
12 of 13 tasks
thclark opened this issue Apr 24, 2024 · 0 comments · May be fixed by #660
Open
12 of 13 tasks

Make Question chains easily extractible from BigQuery Event Store #649

thclark opened this issue Apr 24, 2024 · 0 comments · May be fixed by #660
Assignees
Labels
backend Related to the back end tech-debt Technical debt (tidy up, refactoring, restructuring, caused by laziness now)

Comments

@thclark
Copy link
Contributor

thclark commented Apr 24, 2024

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

Screenshot 2024-04-24 at 11 18 46

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

  • If each event has a parent_question_uuid and a question_uuid then we have a linked list that we can traverse
  • 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).
  • Rename the current originator column to parent
  • Make a new column called originator to record the originator service
  • Update get_events function
  • 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.
  • Update cloud function
  • Redeploy cloud function where needed
  • Update and redeploy bigquery table where needed
  • Test with example service
  • Write test of question chaining
  • Update documentation
  • Test with existing service
@thclark thclark added backend Related to the back end tech-debt Technical debt (tidy up, refactoring, restructuring, caused by laziness now) labels Apr 24, 2024
@cortadocodes cortadocodes self-assigned this May 31, 2024
@cortadocodes cortadocodes linked a pull request May 31, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend Related to the back end tech-debt Technical debt (tidy up, refactoring, restructuring, caused by laziness now)
Projects
Status: In Progress
Development

Successfully merging a pull request may close this issue.

2 participants