- Data Import
- Client APIs
- Data Types
- Numeric Functions
- Text Functions
- Pattern Matching
- Date Functions
- Timestamp Functions
- Blob Functions
- Window Functions
- Why DuckDB
- Code of Conduct
- Live Demo
The first step to using a database system is to insert data into that system. DuckDB provides several data ingestion methods that allow you to easily and efficiently fill up the database. In this section, we provide an overview of these methods so you can select which one is correct for you.
Insert statements are the standard way of loading data into a database system. They are suitable for quick prototyping, but should be avoided for bulk loading as they have significant per-row overhead.
INSERT INTO people VALUES (1, 'Mark');
See here for a more detailed description of insert statements.
Data can be efficiently loaded from CSV files using the
read_csv_auto function or the
SELECT * FROM read_csv_auto('test.csv');
See here for a detailed description of CSV loading.
Parquet files can be efficiently loaded and queried using the
SELECT * FROM parquet_scan('test.parquet');
See here for a detailed description of Parquet loading.
In C++, the
Appender class can be used as an alternative for bulk data loading. The Appender class can be used to efficiently add rows to the database system without needing to use SQL.
Appender appender(con, "people"); appender.AppendRow(1, "Mark"); appender.Close();
See here for a detailed description of the C++ appender.