Open anthonysena opened 2 months ago
Hey Anthony :)
In line 35 there is a hard coded table location sql <- "SELECT * from main.c_covariates;"
Do I need to edit this line? Also, I don't see any table called c_covariates in the BQ table outputs from running the study
Hi @hmorgancooper - good question. Let me provide further details. When the characterization task ran, it writes a SQLite database into the strategusWork
folder that contains the full set of results. The bug we encountered (which this patch addresses) aims to export the full set of results from the SQLite DB that is on your file system and not on the server that hosts your OMOP CDM. So the query:
SELECT * from main.c_covariates;
Will run against the SQLite DB and not your OMOP CDM. If you have removed the strategusWork
folder, you can re-run the Characterization part of the study to recreate this file and then run the patch to obtain the full set of results. Please let me know if you have any further questions.
Hey Anthony,
Thanks! That makes sense! I had changed the connection details to point at our STARR OMOP database so it was searching there.
I've discovered a bug whereby the binary characterization results from the study were limited to the first 1 million records. The good news is that you do not need to re-run the study since the full set of results are stored in your
strategusWork
folder. If you have removed yourstrategusWork
folder, you'll need to recover it (if possible) or worst case run that part of the study again.I've put together a script that will allow you to re-export the characterization results here: https://github.com/ohdsi-studies/SemaglutideNaion/blob/master/extras/ExportCharacterizationPatch.R. Here are some instructions on how to run the script at your site on the machine used to run the study:
outputLocation
,databaseName
andminCellCount
to reflect what you had in theStrategusCodeToRun.R
file when you ran the study: https://github.com/ohdsi-studies/SemaglutideNaion/blob/c48a5e7d9da91b6d73c197f8d3394f478403e3fc/extras/ExportCharacterizationPatch.R#L13-L15