-
Notifications
You must be signed in to change notification settings - Fork 8
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
Read job_summary_data
from multiple log rows
#109
Comments
job_summary_data
from multiple log rows
more name suggestions:
|
I'm choosing the name |
No, let's make that |
addressed in PR# 111 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It would be helpful to have a function that codifies the recipe for reading the job_summary_data out of a log entry for a group of similar records. The need derives from our use of JSON to store the data, MySQL's inability to parse it, and JSONLite's lack of vectorization. Reading one record of
job_summary_data
data is easy, but most use cases can't identify the single record of interest or they want records across a span of time. Here's some sample code that reads all the records saved from a script named warn_owners_of_impending_billThe interesting part is the last two stanzas of code where we give names to a vector of row IDs to query, iteratively read the JSON from those rows, then join the rest of the log data to the decoded JSON:
Putting just these components into the function allows the caller to decide how many records from what script or scripts get decoded. We already have use cases for this function where we want to inspect logged email send failures generated by multiple scripts. As we logged the email failures the same way in each function, aggregating the send failures across them is trivial with a function like this.
This function will need a name. I offer these suggestions:
We need to keep the distinction in people's minds between the
redcapcustodian
job logs and REDCap'sredcap_log_event
table@ChemiKyle, have any ideas on naming?
The text was updated successfully, but these errors were encountered: