DuckDB Installation
Version dev

Version

  • 0.8.1 (Latest Release)
  • GitHub master (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.8.1
install.packages("duckdb")
<dependency>
 <groupId>org.duckdb</groupId>
 <artifactId>duckdb_jdbc</artifactId>
 <version>0.8.1</version>
</dependency>
npm install duckdb
git clone https://github.com/duckdb/duckdb.git
cd duckdb
git checkout v0.8.1
make -j8
git clone https://github.com/duckdb/duckdb.git
cd duckdb
make -j8
Linux 64-bit: https://github.com/duckdb/duckdb/releases/download/v0.8.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'))
Java master 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.9.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

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
Search Shortcut cmd + k | ctrl + k