prql_compile | R Documentation |
Compile a PRQL query into a SQL query
prql_compile(
prql_query,
target = getOption("prqlr.target", default = NULL),
...,
format = getOption("prqlr.format", default = TRUE),
signature_comment = getOption("prqlr.signature_comment", default = TRUE),
display = getOption("prqlr.display", default = "plain")
)
prql_query |
A character of PRQL query. |
target |
A character of the target name to use or |
... |
Ignored. |
format |
A logical flag (default: |
signature_comment |
a logical flag. (default: |
display |
A character, one of |
A character of the compiled SQL query.
"from mtcars | filter cyl > 6 | select {cyl, mpg}" |>
prql_compile()
"from mtcars | filter cyl > 6 | select {cyl, mpg}" |>
prql_compile(format = FALSE, signature_comment = FALSE)
"
from mtcars
filter cyl > 6
select !{cyl}
" |>
prql_compile("sql.duckdb") |>
cat()
# If the `target` argument is `NULL` (default) or `"sql.any"`,
# the target specified in the header of the query will be used.
"
prql target:sql.duckdb
from mtcars
filter cyl > 6
select !{cyl}
" |>
prql_compile() |>
cat()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.