Skip to contents

This function retrieves the configuration settings to work with the FinnGen BQ database for a specified environment and data freeze number.

Usage

fg_get_bq_config(
  environment,
  dataFreezeNumber,
  atlasDevelopment_gckey = Sys.getenv("GCP_SERVICE_KEY"),
  atlasDevelopment_pathToDriver = system.file("drivers", package = "FinnGenUtilsR"),
  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.

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_bq_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
#> 
#> 
#> $schemas
#> $schemas$sandboxToolsSchema
#> [1] "finngen-production-library.sandbox_tools_r13"
#> 
#> $schemas$medicalCodesSchema
#> [1] "finngen-production-library.medical_codes"
#> 
#>