DuckDB Installation
Version 0.3.2

Version

  • 0.5.1 (Latest Release)
  • GitHub master (Bleeding Edge)

Environment

  • Python
  • R
  • Java
  • node.js
  • Julia
  • C/C++
  • CLI
  • ODBC

Package

  • Source
  • Binary

Platform

  • Windows
  • macOS
  • Linux

Installation

pip install duckdb==0.5.1

Usage Example

import duckdb
cursor = duckdb.connect()
print(cursor.execute('SELECT 42').fetchall())
using Pkg
Pkg.add("DuckDB")
# create a new in-memory database
con = DBInterface.connect(DuckDB.DB, ":memory:")

# create a table
DBInterface.execute(con, "CREATE TABLE integers(i INTEGER)")
Not available
pip install duckdb==0.5.1
install.packages("duckdb")
<dependency>
 <groupId>org.duckdb</groupId>
 <artifactId>duckdb_jdbc</artifactId>
 <version>0.5.1</version>
</dependency>
npm install duckdb
coming soon
Linux 64-bit: https://github.com/duckdb/duckdb/releases/download/v0.5.1/duckdb_odbc-linux-amd64.zip

sudo apt-get install unixodbc unixodbc-dev
./unixodbc_setup.sh --help 
pip install duckdb --pre --upgrade
		install.packages('duckdb', repos=c('https://duckdb.r-universe.dev', 'https://cloud.r-project.org'))
		

MacOS Build Artifacts are available from the "OSX" CI runs

Linux Build Artifacts are available from the "LinuxRelease" CI runs

Windows Build Artifacts are available from the "Windows" CI runs

npm install [email protected]

MacOS Build Artifacts are available from the "OSX" CI runs

Linux Build Artifacts are available from the "LinuxRelease" CI runs

Windows Build Artifacts are available from the "Windows" CI runs

MacOS Build Artifacts are available from the "OSX" CI runs
Linux Build Artifacts are available from the "LinuxRelease" CI runs
Windows Build Artifacts are available from the "Windows" CI runs
import duckdb
cursor = duckdb.connect()
print(cursor.execute('SELECT 42').fetchall())
library("DBI")
con = dbConnect(duckdb::duckdb(), ":memory:")
dbWriteTable(con, "iris", iris)
dbGetQuery(con, 'SELECT "Species", MIN("Sepal.Width") FROM iris GROUP BY "Species"')
Class.forName("org.duckdb.DuckDBDriver");
Connection conn = DriverManager.getConnection("jdbc:duckdb:");
Statement stmt = conn.createStatement();
ResultSet rs = stmt.executeQuery("SELECT 42");
var duckdb = require('duckdb');
var db = new duckdb.Database(':memory:'); // or a file name for a persistent DB
db.all('SELECT 42 AS fortytwo', function(err, res) {
  if (err) {
    throw err;
  }
  console.log(res[0].fortytwo)
});
DuckDB db(nullptr);
Connection con(db);
auto result = con.Query("SELECT 42");
result->Print();
./duckdb