Skip to content

bug: Unable to load duckdb extensions from a custom restricted environment #11358

Closed
@vspinu

Description

@vspinu

What happened?

Duckdb extensions cannot be loaded on the fly in our restricted environments (our own pypi, firewalls etc). Instead, we can install the relevant packages and load it ourselves.

This is the pure duckdb code which works on our hdfs+delta environment:

import duckdb
import ibis

from fsspec import filesystem
from duckdb_extensions import extension_importer

duckdb.register_filesystem(filesystem("hdfs"))
extension_importer.import_extension("delta")
duckdb.sql("LOAD 'delta';")

duckdb.sql("select count(*) from delta_scan('hdfs://path/to/tbl/')" )

How can I make the above work with ibis?

con = ibis.duckdb.connect()

# these two fail to discover the installed extensions and attempt to auto-install the extension 
# after a long waiting delay they fail with 
# IOException: IO Error: Failed to download extension "delta" at URL "http://extensions.duckdb.org/v1.2.2/linux_amd64_gcc4/delta.duckdb_extension.gz"
 
ibis.read_delta(...)
con.read_delta(...)


# this fails with ParserException: Parser Error: syntax error at or near "'delta'"
con.sql("LOAD delta")

What version of ibis are you using?

10.5.0

What backend(s) are you using, if any?

duckdb

Relevant log output

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugIncorrect behavior inside of ibis

    Type

    No type

    Projects

    Status

    done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions