Achilles icon indicating copy to clipboard operation
Achilles copied to clipboard

improve error handling when no data exists in cdm

Open fdefalco opened this issue 2 years ago • 0 comments

exportAO will fail with the following error message if data only exists in the person table, but no other tables:

Error in aggregate.data.frame(as.data.frame(x), ...) : no rows to aggregate

This error is occurring in the check for total records (https://github.com/OHDSI/Achilles/blob/main/R/exportAO.R#L1223) This should be modified to check for records returned from the query, if no records are returned provide an error message describing the problem and exit.

fdefalco avatar Aug 17 '22 17:08 fdefalco