DuckDB has a flexible extension mechanism that allows for dynamically loading extensions. These may extend DuckDB’s functionality by providing support for additional file formats, introducing new types, and domain-specific functionality.
Extensions are loadable on all clients (e.g., Python and R). Extensions distributed via the official repository are built and tested on macOS (AMD64 and ARM64), Windows (AMD64) and Linux (AMD64 and ARM64).
We maintain a list of official extensions.
To get a list of extensions, run:
|A zero-copy data integration between Apache Arrow and DuckDB
|Adds support for autocomplete in the shell
DuckDB has three types of extensions.
Built-in extensions are loaded at startup and are immediately available for use.
This will use the
json extension to read the JSON file.
Autoloadable extensions are loaded on first use.
To access files via the HTTPS protocol, DuckDB will automatically load the
Similarly, other autoloadable extensions (
fts) will be loaded on-demand.
If an extension is not already available locally, it will be installed from the official extension repository (
Some extensions make several changes to the running DuckDB instance, hence, autoloading them may not be possible. These extensions have to be installed and loaded using the following SQL statements:
If you are using the Python API client, you can install and load them with the
install_extension(name: str) and
load_extension(name: str) methods.
Autoloadable extensions can also be installed explicitly.
Extensions are signed with a cryptographic key, which also simplifies distribution (this is why they are served over HTTP and not HTTPS). By default, DuckDB uses its built-in public keys to verify the integrity of extension before loading them. All extensions provided by the DuckDB core team are signed.
If you wish to load your own extensions or extensions from third-parties you will need to enable the
To load unsigned extensions using the CLI client, pass the
-unsigned flag to it on startup.
For the Python client, see the Loading and Installing Extensions section in the Python API documentation.
The shared installation location allows extensions to be shared between the client APIs of the same DuckDB version, as long as they share the same
platfrom or ABI. For example, if an extension is installed with version 0.10.0 of the CLI client on macOS, it is available from the Python, R, etc. client libraries provided that they have access to the user’s home directory and use DuckDB version 0.10.0.
See the Working with Extensions page for details on available platforms.
Extensions are by default installed under the user’s home directory:
For example, the extensions for DuckDB version 0.10.0 on macOS ARM64 (Apple Silicon) are installed to
For development builds, the directory of the extensions corresponds to the Git hash of the build, e.g.,
To specify a different extension directory, use the
extension_directory configuration option:
SET extension_directory = '/path/to/your/extension/directory';
The same API that the official extensions use is available for developing extensions. This allows users to extend the functionality of DuckDB such that it suits their domain the best.
A template for creating extensions is available in the
For advanced installation instructions and more details on extensions, see the Working with Extensions page.