Enabling Remote Query Execution Through DuckDB Extensions

QCon New York 2023

Session Architecture

Enabling Remote Query Execution Through DuckDB Extensions

Tuesday Jun 13 / 04:10PM EDT, Salon E

Abstract

DuckDB is a high-performance, embeddable analytical database system that has gained massive popularity in the last few years. It allows you to accomplish a surprising number of analytical tasks blazingly fast since it has a state-of-the-art vectorized query engine and it utilizes the local compute on your laptop to run queries. It is frequently referred to by data professionals as the “SQLite for analytics” for its simplicity and an embeddable model.

For developers, DuckDB provides programmatic access to its entire codebase through its extension model. It supports various data scanners (e.g. parquet, CSV, arrow, JSON) and over 500 scalar/aggregation functions through both in-tree and out-of-tree extensions. Any developer can write their own extension which supports specialized logic and/or functions for their needs. In this talk, we will take a look at how DuckDB extensions works and discuss some best practices and considerations around building DuckDB extensions from experience.

We will also see how we are able to extend the DuckDB extension as far as performing hybrid query execution – a query execution model that allows us to run queries closer to where the data lives in order to achieve better query performance, reduce cost, and give users more flexibility to decide where to run their queries. We will delve into the architecture of DuckDB’s query execution and how we are building out a delightful hybrid execution experience by both leveraging the existing DuckDB query execution flow and contributing to the DuckDB codebase. By the end of the talk, you will gain a better understanding of the power of DuckDB extensions, how query execution works and how to build an extension for your own needs.

Interview

My primary focus is on databases and query execution. I work at Motherduck and we're building a serverless offering of DuckDB, which is an in-memory database invented by researchers at CWI, a Dutch institution. I've been working on this project for the last year, experimenting with new ideas about query execution in local and remote setups.

My main motivation is to share the knowledge I've gained working with DuckDB and experimenting with it. I've been developing cool features with it, and any developer could do something similar because DuckDB is an open-source project. Half of my focus is on the extension model, which allows any programmer or engineer to extend DuckDB and build functionalities on top of it. The other half of the talk is focused on query execution and planning, which is a complex use case of this DuckDB extension model. I want to share my learnings and get some feedback from the audience, especially if they have prior experience working on query execution or have played with DuckDB before.

The audience is most likely a software engineer who has been in the data analytics space for some time, maybe with a focus on databases or data analytics in general. It could also be a data engineer with a strong experience or background in developing applications on top of data warehouses like BigQuery, Snowflake, etc.

First, I want them to be excited about DuckDB and have an idea of wanting to develop something on top of it. Second, I want to share the query execution model we've been experimenting with, and if the audience has any feedback, that would be great.

Topics

Architecture Data Analytics Database Data Warehouse
76% senior dev or higher
1:11 speaker ratio
60+ practitioners

QCon New York 2023 is a three day conference for senior software engineers, architects and team leads. An international program committee of working engineers selects every session. Patterns and practices, not products and pitches.

Share

From the same track

Tuesday 13 June

10:35 Salon E Session Streaming Laying the Foundations for a Kappa Architecture - The Yellow Brick Road Sherin Thomas Staff Software Engineer @Chime 11:50 Salon E Session Stream Processing Streaming from Apache Iceberg - Building Low-Latency and Cost-Effective Data Pipelines Steven Wu Software Engineer @Apple and Apache Iceberg PMC 13:40 Salon D Session Serverless The Rise of the Serverless Data Architectures Gwen Shapira Founder @Nile, PMC Member @Kafka 14:55 Salon E Session Data Architecture Building a Large Scale Real-Time Ad Events Processing System Chao Chu Software Engineer @DoorDash 16:10 Salon E Session Architecture Enabling Remote Query Execution Through DuckDB Extensions Stephanie Wang Founding Engineer @MotherDuck 17:25 Carroll Gardens Unconference Unconference: Modern Data Architecture & Engineering Ben Linders Independent Consultant in Agile, Lean, Quality and Continuous Improvement