Skip to content

[FR] Run SQL chunk with DBI option immediate = TRUE ? #2241

@JrmFRL

Description

@JrmFRL

I understand from the documentation that DBI is used in backend to run SQL chunk.

I try to reproduce the behaviour of running of R instruction similar to:

DBI::dbGetQuery(con, statement = "SELECT * FROM mytable LIMIT 10", immediate = TRUE)

but I could not find any option to pass in the sql chunk header, such as:

```{sql, output.var = "data", connection = "con", immediate = TRUE}
SELECT * FROM mytable LIMIT 10
```

I tried many things such as:

  • immediate = "TRUE/True"
  • params = parameters with parameters <- list(immediate = TRUE) ...

but could not success.

Is there a way to achieve this I have not thought about ?
Thank you !

Metadata

Metadata

Assignees

No one assigned

    Labels

    featurea feature request or enhancementhelp wanted ❤️we'd love your help!theme: knitrconcerns knitr package

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions