getCountryCodes <- function(refresh=FALSE, cluster=4, V2=TRUE, snowflake_inuse=getOption("snowflake_inuse", TRUE), wh=getSnowflakeWH(), dbname=getSnowflakeDB()) {
  if (!refresh && exists("country_codes.spotify", envir=parent.frame()))
    return(country_codes.spotify)
  ## ELSE
  tbl <- "staging_raw_spotify_v2"
  colsToPull <- c(country="user_country")

  if (!isTRUE(V2)) {
    warning("V2=FALSE has been deprected -- are you sure you meant to use table 'staging_raw_spotify'  ??")
    tbl <- "staging_raw_spotify"
    colsToPull <- c(country="country")
  }

  if (!snowflake_inuse) {
    dbname <- NULL
  }

  qry <- makeQry(tbl=tbl, schema="production", colsToPull=colsToPull, distinct=TRUE, aggFunc=NULL, colsToAgg=NULL, dbname=dbname, wh=wh, snowflake_inuse=snowflake_inuse)

  country_codes.spotify <- runQry(qry, cluster=cluster, snowflake_inuse=snowflake_inuse, wh=wh, dbname=dbname)$country
  return(sort(country_codes.spotify))
}

