# NOT RUN {
if (reticulate::py_module_available("sqlparse")) {
library("sqlparseR")
raw <- "SELECT * FROM FOO WHERE BAR > 4500;"
formatted <- sql_format(raw,
keyword_case = "capitalize",
identifier_case = "lower",
reindent = TRUE,
indent_after_first = TRUE)
cat(formatted)
}
# }
Run the code above in your browser using DataLab