#' Query based on search terms that does not write to catalogue
#' @param ... vector of phrases to collectively feed into the LIKE sql statement
#' @return resultset as a dataframe with all column types as character and trimmed white space
#' @importFrom mySeagull connect_to_local_postgres
#' @import DBI
#' @importFrom rubix call_mr_clean
#' @import dplyr
#' @export
strictly_ask_athena <-
function(phrase, limit = 1) {
sql_statement <- paste0("SELECT * FROM public.concept WHERE concept_name = '", phrase, "' ")
sql_statement <- paste0(sql_statement, "LIMIT ", limit, ";")
conn_to_athena <- mySeagull::connect_to_local_postgres(dbname = "athena")
resultset <- DBI::dbGetQuery(conn = conn_to_athena,
statement = sql_statement)
DBI::dbDisconnect(conn_to_athena)
return(resultset %>%
rubix::call_mr_clean())
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.