FINNGEN / ETL

second version for the ETL of the detailed longitudinal data to the OMOP-CDM
https://finngen.github.io/ETL/
MIT License
0 stars 0 forks source link

Path to GCP key problem in Sandbox #155

Open shanmukhasampath opened 1 year ago

shanmukhasampath commented 1 year ago

In setup_environment_functions.R the function takes path_to_gcp_key variable which is required for GCP token for accessing atlas-development-270609 project but is not required in Sandbox.

In Sandbox, we will get NA which breaks the function https://github.com/FINNGEN/ETL/blob/ea3eb1edeb367683936956740ec021e1d5db09b9/3_etl_code/ETL_Orchestration/R/setup_enviroment_functions.R#L37-L40

Simple fix is to check if path_to_gcp_key is NA then do not use the variable in python script python_functions.py

if path_to_gcp_key != 'NA'{
    os.environ["GOOGLE_APPLICATION_CREDENTIALS"]=path_to_gcp_key
}