Loads the DuckDB excel extension and creates a table from a CSV file
using the read_csv_auto() table function. The destination is fully qualified
as <database>.<schema>.<table>. Only the options you supply are forwarded
to read_csv_auto() (e.g., header, all_varchar, sample_size,
names, types, skip, union_by_name, normalize_names,
allow_quoted_nulls, ignore_errors). If names or types are not supplied,
they are ignored. See the DuckDB read_csv_auto() documentation for more information.
read_csv(
.con,
to_database_name,
to_schema_name,
to_table_name,
file_path,
header,
all_varchar,
sample_size,
names,
types,
skip,
union_by_name,
normalize_names,
allow_quoted_nulls,
ignore_errors,
write_type,
...
)Invisibly returns NULL. Side effect: creates <database>.<schema>.<table> with the CSV data
A valid DBI connection (DuckDB / MotherDuck).
Target database name (new or existing)
Target schema name (new or existing)
Target table name to create (new or existing)
Path to the Excel file (.xlsx)
Logical; if TRUE, first row is header
Logical; coerce all columns to VARCHAR
Numeric; number of rows used for type inference
Character vector; optional column names to assign instead of reading from the file
Named or unnamed character vector; column types (named preferred, unnamed paired to names)
Integer; number of rows to skip at the beginning of the file
Logical; union multiple CSVs by column name
Logical; normalize column names (lowercase, replace spaces)
Logical; treat "NULL" in quotes as NULL
Logical; continue on row parse errors
Character; either "overwrite" or "append", controls table creation behavior
Additional arguments passed to read_csv_auto() in format listed in duckdb documentation (optional)
Other db-read:
read_excel()