
SQL table-function expressions and file operations with sanitized paths
Source:R/paths.R
sql_path_helpers.Rdread_csv_sql() and read_parquet_sql() build read_csv_auto('<path>', ...) /
read_parquet('<path>', ...) expressions, attach_database() runs ATTACH, and sql_copy_to() runs
COPY ... TO, all through sanitize_sql_path().
Usage
read_csv_sql(path, ...)
read_parquet_sql(path, ...)
attach_database(con, path, alias, read_only = FALSE, db_type = NULL)
sql_copy_to(con, source, path, format = "PARQUET", options = list())Arguments
- path
File path (see
sanitize_sql_path()).- ...
Named reader options, e.g.
all_varchar = TRUE.- con
DuckDB DBI connection.
- alias
Alias for the attached database.
- read_only
Logical; attach read-only.
- db_type
Optional ATTACH
TYPE(e.g."SQLITE").- source
Table name or parenthesized query to copy.
- format
COPY
FORMAT(default"PARQUET").- options
Named list of extra COPY options.