#   
#   
#   ALTER WAREHOUSE "LOAD_WH" SET WAREHOUSE_SIZE = 'LARGE' 
#   AUTO_SUSPEND = 1800 AUTO_RESUME = TRUE;
#   
#   CREATE WAREHOUSE This_is_theName WITH WAREHOUSE_SIZE = 'MEDIUM' WAREHOUSE_TYPE = 'STANDARD' AUTO_SUSPEND = 1800 AUTO_RESUME = TRUE COMMENT = 'This is a comment line';
#   
#   
#   
#   
#   
#   ## TESTING sfCreateWH()
#   if (FALSE) {
#     sfCreateWH("BI", just_query=TRUE)
#     sfCreateWH("BI", just_query=TRUE, showWarnings=FALSE)
#     sfCreateWH("BI", size="M", just_query=TRUE)
#     sfCreateWH("BI", size="M", type="std", just_query=TRUE)
#     sfCreateWH("BI", size="M", type="ent", just_query=TRUE)
#     ## ERROR
#     sfCreateWH("BI", size="Md", just_query=TRUE)
#   
#     if (FALSE) {
#       sfCreateWH("BI", size="M", type="std", just_query=TRUE)
#     }
#   
#   }
#   
#   sfCreateWH <- function(name, size=NULL, type='STANDARD', auto_suspend_minutes=NULL, auto_resume=FALSE, initially_suspended=TRUE, replace=FALSE, if_not_exists=TRUE, just_query=FALSE, quote_name=FALSE, showWarnings=TRUE, connex=sfGetCon(), verbose_qry=TRUE) {
#   ## Reference https://documentation.snowflakecomputing.com/manuals/sql-reference/ddl-virtual-warehouse.html?#create-warehouse
#   ##
#   ## NOTE: No need to check name against existing warehouses. This is handled by the SQL
#   ## 
#   ## quote_name :: setting to TRUE wraps name in 'single quotes'. This has the effect of making the warehouse name case SENSITIVE and must always be referred to exactly
#   
#     if (showWarnings && is.null(size))
#         warning ("size is NULL.  It is recommended that it be set explicitly to either XS, S, M, L or XL")
#     
#   
#     args_not_params <- c("name", "replace", "if_not_exists", "just_query", "quote_name", "showWarnings", "connex", "verbose_qry", "args_not_params")
#     args <- collectArgs(except=args_not_params)
#     params_string <- do.call(.sf.make_wh_params, c(args, with=TRUE))
#   
#   
#     name <- toupper(name)
#   
#     qry <- paste (
#         "CREATE"
#         , if (isTRUE(replace)) "OR REPLACE"
#         , "WAREHOUSE"
#         , name
#         , if (isTRUE(if_not_exists)) "IF NOT EXISTS"
#         # , pasteC(PARAMS, C=",")
#         , params_string
#   
#       )
#     setQry(qry)
#   
#     if (just_query)
#       return(qry)
#   
#     sfQry(qry, connex=connex, verbose=verbose_qry, warehouse=NULL, size=size, type=type)
#   }
#   
#   sfIncreaseWH <- function(name, size=NULL, auto_suspend_minutes=NULL, auto_resume=FALSE, initially_suspended=TRUE, replace=FALSE, if_not_exists=TRUE) {
#   ## Reference https://documentation.snowflakecomputing.com/manuals/sql-reference/ddl-virtual-warehouse.html?#create-warehouse
#   
#     name <- toupper(name)
#     PARAMS <- .sf.make_wh_params(name=NULL, size=size, auto_suspend_minutes=auto_suspend_minutes, initially_suspended=initially_suspended)
#     cat("", PARAMS, sep="\n")
#   
#     qry <- paste (
#         "CREATE"
#         , if (isTRUE(replace)) "OR REPLACE"
#         , "WAREHOUSE"
#         , if (isTRUE(if_not_exists)) "IF NOT EXISTS"
#   
#       )
#   
#   
#   }
#   
#   CREATE [ OR REPLACE ] WAREHOUSE [ IF NOT EXISTS ] <name> [ [ WITH ] <properties> ]
#   
#   Where:
#   
#     <properties> is one or more of the following parameters, each separated by
#     a blank space or new line:
#   
#       WAREHOUSE_SIZE= XSMALL | SMALL | MEDIUM | LARGE | XLARGE | XXLARGE
#       WAREHOUSE_TYPE= STANDARD | ENTERPRISE
#       AUTO_SUSPEND= <idle_time>
#       AUTO_RESUME= TRUE | FALSE
#       INITIALLY_SUSPENDED= TRUE | FALSE
