Skip to content
Pedro Holanda edited this page Jun 22, 2024 · 1 revision

Scrooge is a third-party DuckDB extension. Using it requires additional setup compared to a native DuckDB extension. On this page, you will find explanations and examples for setting up the Scrooge extension in your DuckDB instance.

Setting the Extension Repository.

The binaries are distributed in a custom S3 bucket. To use them in DuckDB, you must set two variables related to the extension and its repository.

The custom_extension_repository to the scrooge S3 Bucket and the allow_extensions_metadata_mismatch to True.

Example

SET custom_extension_repository='https://scrooge-duck.s3.us-west-2.amazonaws.com';
SET allow_extensions_metadata_mismatch=true;

Unsigned Extensions

Unsigned extensions (i.e., extensions that are not native to DuckDB) require a parameter to be specified when creating a connection. You can find more of it in the DuckDB Docs.

Python Example

import duckdb
con = duckdb.connect(':memory:', config={'allow_unsigned_extensions' : 'true'})

CLI Example

duckdb -unsigned

Install and Load

After setting the extension repository, installing and loading the extensions works like any other DuckDB extension. You can simply call the INSTALL and LOAD commands from the SQL interface, using scrooge as a parameter.

Example

INSTALL 'scrooge'
LOAD 'scrooge'

After loading the extension, you can use Scrooge as you wish.