Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[Post] knitr hooks for automatically printing SQL translation of dplyr code #129

Open
gadenbuie opened this issue Nov 16, 2022 · 0 comments

Comments

@gadenbuie
Copy link
Owner

Good for collaborating with devops folks.

# A non-knitr example
with_show_query <- function(code) {
  sql <- sprintf(
    "\n\n<details><summary>SQL for previous query</summary>\n\n```sql\n%s\n```\n\n</details>\n\n",
    dbplyr::remote_query(code)
  )
  print(code)
  knitr::asis_output(sql)
}
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

1 participant