Skip to content
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

Add warning if no results found by createMergedResultsFile #1045

Open
MaximMoinat opened this issue Apr 7, 2023 · 1 comment
Open

Add warning if no results found by createMergedResultsFile #1045

MaximMoinat opened this issue Apr 7, 2023 · 1 comment

Comments

@MaximMoinat
Copy link

MaximMoinat commented Apr 7, 2023

Description

If there is no results zip in the given dataFolder when running createMergedResultsFile, it will show that it connects to a database and then exits (see screenshot). This does create a .sqlite file with all necessary results tables, but no records are loaded. Then, when running the Shiny app, I just get the error 'Object databases not found'. This is especially confusing when the result csv's are in the given folder, but for some reason there is no zip of the results.

image

(Using version 3.1.0)

Suggested fix

Display a warning "No result zip files found", on line 197 here:

CohortDiagnostics/R/Shiny.R

Lines 197 to 212 in 0e3764f

listOfZipFilesToUpload <-
list.files(
path = dataFolder,
pattern = ".zip",
full.names = TRUE,
recursive = TRUE
)
for (zipFileName in listOfZipFilesToUpload) {
uploadResults(
connectionDetails = connectionDetails,
schema = "main",
zipFileName = zipFileName,
tablePrefix = tablePrefix
)
}

@azimov
Copy link
Collaborator

azimov commented Apr 13, 2023

Agreed - but i think stopping/throwing an error is better as it will avoid leaving an empty database file in the folder

@azimov azimov added this to the Release version 3.4.0 milestone Oct 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants