duckdb_engine icon indicating copy to clipboard operation
duckdb_engine copied to clipboard

Setting duckdb local configuration options

Open loicalleyne opened this issue 1 year ago • 2 comments

I'm trying to get duckdb working with Superset to read an Iceberg table. I imagine I will need to load https and iceberg extensions to do so, however when I put the following in connection_args

{
  "connect_args":{
        "preload_extensions": ["https"]
        }
}

I get the following error:

ERROR: (builtins.NoneType) None
[SQL: (duckdb.duckdb.IOException) IO Error: Can't find the home directory at ''
Specify a home directory using the SET home_directory='/path/to/dir' option.

I've tried

{
  "connect_args":{
        "preload_extensions": ["https"],
        "config": {
          "home_directory":"/usr/local/src/superset"
        }
      }
}

but then I get

ERROR: (builtins.NoneType) None
[SQL: (duckdb.duckdb.InvalidInputException) Invalid Input Error: Could not set option "home_directory" as a global option

Is there a way to set a local configuration option?

loicalleyne avatar Jul 18 '24 21:07 loicalleyne

I would also be interested in being able to set home_directory via the connect args

b-schmeling avatar Feb 18 '25 18:02 b-schmeling

yes im getting this issue also. im trying to use duckdb inside a docker container inside a lambda function and need to manually set a home directory.

damiah avatar Feb 20 '25 21:02 damiah