diff --git a/admin/genie_setup.sql b/admin/genie_setup.sql new file mode 100644 index 00000000..33116dd1 --- /dev/null +++ b/admin/genie_setup.sql @@ -0,0 +1,14 @@ +USE ROLE sysadmin; +CREATE DATABASE IF NOT EXISTS genie; + +-- ! Grant roles +USE ROLE SECURITYADMIN; +grant USAGE on database genie +to role genie_admin; +GRANT USAGE ON FUTURE SCHEMAS IN DATABASE GENIE +TO ROLE genie_admin; +GRANT SELECT ON FUTURE TABLES IN DATABASE GENIE +TO ROLE genie_admin; + +GRANT USAGE ON WAREHOUSE tableau +TO ROLE genie_admin; diff --git a/admin/roles.sql b/admin/roles.sql index 706d4dda..6b01de94 100644 --- a/admin/roles.sql +++ b/admin/roles.sql @@ -19,18 +19,6 @@ grant role genie_admin to user "xindi.guo@sagebase.org"; grant role genie_admin to user "chelsea.nayan@sagebase.org"; -grant USAGE on database genie -to role genie_admin; -GRANT USAGE ON FUTURE SCHEMAS IN DATABASE GENIE -TO ROLE genie_admin; -GRANT SELECT ON FUTURE TABLES IN DATABASE GENIE -TO ROLE genie_admin; --- GRANT USAGE ON ALL SCHEMAS IN DATABASE GENIE --- TO ROLE genie_admin; --- GRANT SELECT ON ALL TABLES IN DATABASE GENIE --- TO ROLE genie_admin; -GRANT USAGE ON WAREHOUSE tableau -TO ROLE genie_admin; // RECOVER USE ROLE USERADMIN; diff --git a/elt/genie_setup.sql b/elt/genie_setup.sql deleted file mode 100644 index b8e30025..00000000 --- a/elt/genie_setup.sql +++ /dev/null @@ -1,18 +0,0 @@ -use role sysadmin; -CREATE DATABASE IF NOT EXISTS genie; - - --- use database genie; --- use schema public_13_1; - --- CREATE TABLE IF NOT EXISTS "sample" ( --- PATIENT_ID STRING, --- SAMPLE_ID STRING, --- AGE_AT_SEQ_REPORT STRING, --- ONCOTREE_CODE STRING, --- SAMPLE_TYPE STRING, --- SEQ_ASSAY_ID STRING, --- CANCER_TYPE STRING, --- CANCER_TYPE_DETAILED STRING, --- SAMPLE_TYPE_DETAILED STRING --- );