create_hive_context <- function(sc) {
UseMethod("create_hive_context")
}
apply_config <- function(object, params, method, prefix) {
if (!length(params)) {
return(object)
}
params %>%
purrr::map_if(is.logical, ~ (if (.x) "true" else "false")) %>%
purrr::map_chr(as.character) %>%
purrr::imap(~ list(key = .y, value = .x)) %>%
purrr::reduce(~ invoke(.x, method, paste0(prefix, .y$key), .y$value), .init = object)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.