OHDSI / FeatureExtraction

An R package for generating features (covariates) for a cohort using data in the Common Data Model.
http://ohdsi.github.io/FeatureExtraction/
61 stars 58 forks source link

Option to turn off messages FeatureExtraction::getDbCovariateData #135

Open gowthamrao opened 3 years ago

gowthamrao commented 3 years ago

When running characterization on a large set of cohorts - especially when chunked over batches like below, FeatureExtraction::getDbCovariateData spits out a lot of messages into the console. These messages are not informative and add to clutter.

DatabaseConnector when executing SQL has options to turn off such messages e.g. reportOverallTime = FALSE, showProgressBar = FALSE.

The request is for an option in getDbCovariateData to turn off these messages - so that we can reduce R console being cluttered with messages that are negatively contributing to end-users experience.

I tried suppressMessage() & invisible() - it did not work for me


Constructing features on server
  |==================================================================================================================================| 100%
Executing SQL took 56.4 secs
Fetching data from server
Fetching data took 15.8 secs
    - Batch characterization. Processing cohorts 4 through 6
Sending temp tables to server
Constructing features on server
  |==================================================================================================================================| 100%
Executing SQL took 49.5 secs
Fetching data from server
Fetching data took 10.4 secs
    - Batch characterization. Processing cohorts 7 through 7
Sending temp tables to server
Constructing features on server
  |==================================================================================================================================| 100%
Executing SQL took 14 secs
Fetching data from server
Fetching data took 4.61 secs
gowthamrao commented 3 years ago

purrr::quietly() also doesnt work :(