A table function is a callable query component that returns rows and columns, letting SQL read or generate relation-shaped data. DuckDB uses functions such as read_csv_auto and read_parquet to inspect external files and feed their results into queries or INSERT statements. section 3.4.1
Load a remote CSV into a table
INSERT INTO readings(system_id, read_on, power) SELECT SiteId, "Date-Time", CASE WHEN ac_power < 0 OR ac_power IS NULL THEN 0 ELSE ac_power END FROM read_csv_auto('https://developer.nrel.gov/api/pvdaq/v3/data_file?api_key=DEMO_KEY&system_id=34&year=2019'); Here, read_csv_auto supplies the input relation, while SELECT transforms its columns before insertion. section 3.4.1
INSERT INTO prices VALUES (1, 11.59, '2018-12-01', '2019-01-01');
Inspect the attempted dynamic-file query, which combines range-generated URLs with read_csv_auto and exposes table-function parameter restrictions. section 3.4.1
