DuckDB Installation
Version 0.9.1

Version

  • 0.9.1 (Latest Release)
  • GitHub main (Bleeding Edge)

Environment

  • Command Line
  • Python
  • R
  • Java
  • Node.js
  • Julia
  • C/C++
  • ODBC

Package

  • Source
  • Binary

Platform

  • Windows
  • macOS
  • Linux

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.9.1
install.packages("duckdb")
<dependency>
 <groupId>org.duckdb</groupId>
 <artifactId>duckdb_jdbc</artifactId>
 <version>0.9.2</version>
</dependency>
npm install duckdb
git clone https://github.com/duckdb/duckdb.git
cd duckdb
git checkout v0.9.1
make -j8
git clone https://github.com/duckdb/duckdb.git
cd duckdb
make -j8
pip install duckdb --pre --upgrade
install.packages('duckdb', repos=c('https://duckdb.r-universe.dev', 'https://cloud.r-project.org'))
Java dev builds are available in the sonatype snapshots repository, which can be accessed with the following:
<dependency>
	<groupId>org.duckdb</groupId>
	<artifactId>duckdb_jdbc</artifactId>
	<version>0.10.0-SNAPSHOT</version>
</dependency>

...

<repositories>
	<repository>
		<id>oss-sonatype</id>
		<name>oss-sonatype</name>
		<url>https://oss.sonatype.org/content/repositories/snapshots/</url>
		<snapshots>
			<enabled>true</enabled>
		</snapshots>
	</repository>
</repositories>
		
npm install duckdb@next
Not available
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
Search Shortcut cmd + k | ctrl + k