Skip to contents

This function retrieves the configuration settings to work with the OMOP-CDM database for a specified environment and data freeze number.

Usage

fg_get_cdm_config(
  environment,
  dataFreezeNumber,
  cohortTableName = "test_cohort_table",
  atlasDevelopment_gckey = Sys.getenv("GCP_SERVICE_KEY"),
  atlasDevelopment_pathToDriver = system.file("extdata", "my_raw_data.csv", package =
    "my_package"),
  asYaml = FALSE
)

Arguments

environment

Environment must be 'sandbox-' followed by the sandbox number (Alternatively, it can be 'atlasDevelopment' for testing outside sandbox).

dataFreezeNumber

The data freeze number to retrieve configuration settings for.

cohortTableName

If a cohort table is needed, it can be set here, (default is "test_cohort_table").

atlasDevelopment_gckey

If environment = 'atlasDevelopment', the path to the Google Cloud key file.

atlasDevelopment_pathToDriver

If environment = 'atlasDevelopment', the path to the BigQuery driver.

asYaml

Whether to return the configuration settings as a YAML string (default is FALSE).

Value

A list of configuration settings for the specified environment and data freeze number.

Examples

fg_get_cdm_config("sandbox-6", 13)
#> Set option sqlRenderTempEmulationSchema = 'fg-production-sandbox-6.sandbox'
#> $databaseName
#> [1] "FinnGen-DF13"
#> 
#> $connection
#> $connection$connectionDetailsSettings
#> $connection$connectionDetailsSettings$dbms
#> [1] "bigquery"
#> 
#> $connection$connectionDetailsSettings$user
#> [1] ""
#> 
#> $connection$connectionDetailsSettings$password
#> [1] ""
#> 
#> $connection$connectionDetailsSettings$connectionString
#> [1] "jdbc:bigquery://https://www.googleapis.com/auth/bigquery:433;ProjectId=fg-production-sandbox-6;OAuthType=3;Timeout=10000;"
#> 
#> $connection$connectionDetailsSettings$pathToDriver
#> [1] "/home/ivm/.jdbc_drivers/bigquery"
#> 
#> 
#> $connection$tempEmulationSchema
#> [1] "fg-production-sandbox-6.sandbox"
#> 
#> $connection$useBigrqueryUpload
#> [1] TRUE
#> 
#> 
#> $cdm
#> $cdm$cdmDatabaseSchema
#> [1] "finngen-production-library.finngen_omop_r13"
#> 
#> $cdm$vocabularyDatabaseSchema
#> [1] "finngen-production-library.finngen_omop_r13"
#> 
#> 
#> $cohortTable
#> $cohortTable$cohortDatabaseSchema
#> [1] "fg-production-sandbox-6.sandbox"
#> 
#> $cohortTable$cohortTableName
#> [1] "test_cohort_table"
#> 
#> 
#> $webAPIurl
#> [1] "https://ohdsi-webapi.app.finngen.fi/WebAPI/"
#>