load_csv: Register a CSV dataset as a view on a DuckDB connection

View source: R/datasets.R

load_csvR Documentation

Register a CSV dataset as a view on a DuckDB connection

Description

Validates the URL, loads the azure extension, then registers the dataset as a VIEW over read_csv_auto(). Use az_conn() first if the connection needs an Azure secret. Returns conn invisibly — use tbl_csv() if you want a dplyr::tbl().

Usage

load_csv(conn, url, name, replace = TRUE, ...)

Arguments

conn

A DuckDB connection.

url

Character scalar. Azure Blob URL. Supports glob patterns.

name

Character scalar. Name to register the view under in DuckDB.

replace

Logical. Replace an existing view. Default TRUE.

...

Reader options forwarded to DuckDB's read_csv_auto().

Value

Invisibly returns conn.

Examples

## Not run: 
# Requires a live Azure account, credentials, and network access.
conn <- az_conn()
load_csv(conn, "abfss://container@account/data/*.csv", name = "events")

## End(Not run)

quak documentation built on June 9, 2026, 5:09 p.m.