-
Notifications
You must be signed in to change notification settings - Fork 78
Closed
Description
I think the three most commonly used R Markdown chunk engines are R, python, and SQL. I noticed that knitr has a rudimentary python engine, but the reticulate package contains its own, much more complex python engine. In this issue in the knitr repo, someone's asking about passing passing parameters in a SQL chunk and @yihui basically says to ask @javierluraschi because he wrote the SQL engine. I think it makes sense to move the SQL engine into a repo that's all about executing SQL, or maybe to create a second, more sophisticated SQL engine for R Markdown in this repo.
Some ideas for an enhanced SQL engine:
- A way to pass additional arguments such as
immediate, todbGetQuery/dbExecutevia chunk options - Allow multiple, semicolon separated, SQL statements in a single chunk
- Better guessing about whether to execute a query with
dbExecuteordbGetQuery(see here) - When a query is executed with
dbExecute(), emit amessage()about the number of affected rows (potentially helpful to the author, easily hidden from output with themessage = FALSEchunk option) - Parse comments out of SQL code using
sqlCommentSpecinstead of regex for/* ... */and/or-- ... - A vignette all about SQL chunks
What do you think about adding a knitr SQL engine to the DBI package? I'd be willing to take a shot at a first draft.
Metadata
Metadata
Assignees
Labels
No labels