Skip to content

Instantly share code, notes, and snippets.

@raprasad
Last active August 23, 2018 16:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save raprasad/ca2b63893791d6ae7eb07e8160d303d4 to your computer and use it in GitHub Desktop.
Save raprasad/ca2b63893791d6ae7eb07e8160d303d4 to your computer and use it in GitHub Desktop.
EventData saved queries

Saved Queries for Event Data

Specifically, before seeing the app in action, I thought of these as two distinct parts:

  • (a) Saving/Retrieving queries to the database
  • (b) Running queries and storing the results in Dataverse
    • Run mongo query
    • Write result to a temporary file
    • Push the file and a related readme file to Dataverse
    • Publish the Dataset, allowing the new file to be publicly viewable

Currently, the UI workflow runs (a) and (b) together. This is to discuss a workflow where they are potentially split apart.

The scenarios below are my (currently naive) understanding of possible use cases.

Scenario 1

The researcher has worked with the system for 30 minutes, saving 5 queries. She/he can list, review, or delete the queries.

  • Tech notes
    • Handled by part (a)
    • Fairly quick, simply saving/retrieving JSON using the SQL database
    • Each saved query is tied to the logged in user

Scenario 2

The researcher has worked with the system for 30 minutes, saving 5 queries. She/he has decided to save 1 of the queries and its result on Dataverse.

  • Tech notes
    • Handled by (b)
    • May take a up to a few minutes to complete
    • UI given a callback url to check the progress of the process
      • Note: Next month, we can add websockets so the callback url won't be needed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment