DuckDB extension to read and write to SQLite databases
https://duckdb.org/docs/extensions/sqlite โ HEALTH ? 93 / Healthy
DuckDB extension to read and write to SQLite databases
https://duckdb.org/docs/extensions/sqlite โ// readme
The SQLite extension allows DuckDB to directly read and write data from a SQLite database file. The data can be queried directly from the underlying SQLite tables. Data can be loaded from SQLite tables into DuckDB tables, or vice versa.
To make a SQLite file accessible to DuckDB, use the ATTACH command, for example with the bundled sakila.db file:
ATTACH 'data/db/sakila.db' AS sakila;
USE sakila;
The tables in the file can be read as if they were normal DuckDB tables, but the underlying data is read directly from the SQLite tables in the file at query time.
SHOW TABLES;
You can query the tables using SQL, e.g. using the example queries from sakila-examples.sql
SELECT cat.name category_name,
Sum(Ifnull(pay.amount, 0)) revenue
FROM category cat
LEFT JOIN film_category flm_cat
ON cat.category_id = flm_cat.category_id
LEFT JOIN film fil
ON flm_cat.film_id = fil.film_id
LEFT JOIN inventory inv
ON fil.film_id = inv.film_id
LEFT JOIN rental ren
ON inv.inventory_id = ren.inventory_id
LEFT JOINโฆ