From 75deaf7c263d29356b0706d0e70a084c13ce79ff Mon Sep 17 00:00:00 2001 From: Meng Li <34143965+Meng6@users.noreply.github.com> Date: Tue, 18 Aug 2020 14:32:26 -0400 Subject: [PATCH] Fix sql file name for restore_sql_file.py --- src/data/restore_sql_file.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/data/restore_sql_file.py b/src/data/restore_sql_file.py index b7519930..43859311 100644 --- a/src/data/restore_sql_file.py +++ b/src/data/restore_sql_file.py @@ -11,7 +11,7 @@ config.read(snakemake.input["db_credentials"]) # bash command to create table and restore tables from sql file checkdb_cmd = "mysql -h " + config[group]["host"] + " -u " + config[group]["user"] + " -p" + config[group]["password"] + " -e use " + config[group]["database"] create_cmd = "mysql -h " + config[group]["host"] + " -u " + config[group]["user"] + " -p" + config[group]["password"] + " -e \"CREATE DATABASE IF NOT EXISTS " + config[group]["database"] + ";\"" -restore_cmd = "mysql -h " + config[group]["host"] + " -u " + config[group]["user"] + " -p" + config[group]["password"] + " " + config[group]["database"] + " < data/external/" + config[group]["database"] + ".sql" +restore_cmd = "mysql -h " + config[group]["host"] + " -u " + config[group]["user"] + " -p" + config[group]["password"] + " " + config[group]["database"] + " < data/external/rapids_example.sql" try: subprocess.run(checkdb_cmd.split(), check = True)