prql_compile {prqlr} | R Documentation |
Compile a PRQL query into a SQL query
Description
Compile a PRQL query into a SQL query
Usage
prql_compile(
prql_query,
target = getOption("prqlr.target", default = NULL),
format = getOption("prqlr.format", default = TRUE),
signature_comment = getOption("prqlr.signature_comment", default = TRUE)
)
Arguments
prql_query |
a PRQL query string. |
target |
a compile target name to use. If not specified ( |
format |
a logical flag (default: |
signature_comment |
a logical flag. (default: |
Value
a SQL query string
See Also
Examples
"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()
[Package prqlr version 0.8.1 Index]