pip install duckdb-extensions duckdb-extension-substrait
You are ready to install the extension for duckdb.
from duckdb_extensions import extension_importer
extension_importer.import_extension("substrait")
Verify that the extension is installed.
import duckdb
print(
duckdb.sql("""SELECT installed
FROM duckdb_extensions() where
extension_name='substrait' or
list_contains(aliases, 'substrait')""")
.fetchone()[0]
)
duckdb-extension-substrait
is distributed under the terms of the MIT license.