EHDEN / CatalogueExport

Exports the data from the OMOP-CDM that is necessary for the EHDEN Database Catalogue
Apache License 2.0
9 stars 6 forks source link

Export query was not executed successfully #58

Closed joaofonseca9 closed 1 year ago

joaofonseca9 commented 1 year ago

Describe the bug I am trying to reproduce the catalogue export for OMOP CDM v6, by removing analysis ids that use fields and tables not existent in the CDM v6.

The error it gives is Export query was not executed successfully with no further explanation

To Reproduce Steps to reproduce the behavior:

  1. See code:
run_catalogue_export <- function(dbms,
                            connectionString,
                            jdbcDriverFolder,
                            user,
                            password,
                            outputFolder,
                            cdmDatabaseSchema,
                            databaseInfoConfigFilePath
){
    # Read the yaml file
    data <- yaml::read_yaml(databaseInfoConfigFilePath)

    # Access the values in the file
    databaseName <- data$databaseName

    parsed_uri <- urltools::url_parse(connectionString)
    server <- paste0(parsed_uri$domain, "/", parsed_uri$path)
    port <- as.integer(parsed_uri$port)

    connectionDetails <- DatabaseConnector::createConnectionDetails(dbms = dbms,
                                                user = user,
                                                password = password,
                                                server = server,
                                                port = port,
                                                pathToDriver = jdbcDriverFolder)

    df <- CatalogueExport::getAnalysisDetails()
    analysis_ids <- df$ANALYSIS_ID
    filtered_ids <- analysis_ids[!(analysis_ids %in% c(920, 1020))]

    CatalogueExport::catalogueExport(connectionDetails,
                    cdmDatabaseSchema = cdmDatabaseSchema,
                    resultsDatabaseSchema = cdmDatabaseSchema,
                    vocabDatabaseSchema = cdmDatabaseSchema,
                    numThreads = 1,
                    sourceName = databaseName,
                    outputFolder = file.path(getwd(), outputFolder),
                    cdmVersion = data$cdmVersion,
                    analysisIds=filtered_ids)
}
  1. See error log.txt

Expected behavior Should be exporting the file cataloge_results.csv

MaximMoinat commented 1 year ago

CatalogueExport does not support OMOP CDM v6