Seth,

there has been an enhancement in *master* (not in 3.11) for being able to load libduckdb when the ADBC driver is built without libadbc-driver-manager support. So if you're not on master, this is expected

Even

Le 12/07/2025 à 12:45, Seth G via gdal-dev a écrit :
Hi all,

I'm wondering if anyone has got this working on Windows?

With a test.db the following works fine on a full Linux GDAL Docker image:

docker run -it --name gdal-ubuntu -v D:/Data/GDAL:/data 
ghcr.io/osgeo/gdal:ubuntu-full-3.11.0 /bin/bash
ogr2ogr out.gpkg test.db

>From the docs https://gdal.org/en/latest/drivers/vector/adbc.html

"Assuming libduckdb.so, libduckdb.dylib or duckdb.dll is available (and it is in a 
system location, or can be located through LD_LIBRARY_PATH on Linux, DYLD_LIBRARY_PATH on 
MacOSX or PATH on Windows)."

I'm trying to get this working using GDAL via Conda on Windows. The ADBC driver 
is isntalled:

gdal vector --formats
# includes ADBC -vector- (ro): Arrow Database Connectivity

I tried downloaded the duckdb.dll from 
https://duckdb.org/docs/installation/?version=stable&environment=cplusplus&platform=win&download_method=direct&architecture=x86_64
 (https://github.com/duckdb/duckdb/releases/download/v1.3.2/libduckdb-windows-amd64.zip) and 
setting the path:

$env:Path = "D:\Tools\libduckdb-windows-amd64;" + $env:Path
ogr2ogr out.gpkg test.db

Each time, the following error is returned:

ERROR 1: Unable to open datasource `test.db' with the following drivers.

With a longer command:

ogr2ogr -f parquet overture-vt-addresses.parquet `
        -oo ADBC_DRIVER="D:/Tools/libduckdb-windows-amd64/duckdb.dll" `
        -oo PRELUDE_STATEMENTS="LOAD SPATIAL" `
        -oo PRELUDE_STATEMENTS="LOAD PARQUET" `
        -oo PRELUDE_STATEMENTS="load httpfs" `
        -oo PRELUDE_STATEMENTS="load aws" `
        -oo SQL="select * from 
read_parquet('s3://overturemaps-us-west-2/release/2025-05-21.0/theme=addresses/type=address/*')'"
  ADBC:

Results in:

ERROR 1: AdbcLoadDriver() failed:
ERROR 1: Unable to open datasource `ADBC:' with the following drivers.

I tried various paths for ADBC_DRIVER:

        -oo ADBC_DRIVER="D:/Tools/libduckdb-windows-amd64"
        -oo ADBC_DRIVER="D:/Tools/libduckdb-windows-amd64/duckdb.dll"
        -oo ADBC_DRIVER="D:\Tools\libduckdb-windows-amd64\duckdb.dll"

Just to note the following works in the Conda environment:

python -c "import 
ctypes;ctypes.CDLL(r'D:\Tools\libduckdb-windows-amd64\duckdb.dll')"

conda install duckdb doesn't help and `conda install conda-forge::libduckdb` 
isn't available on Windows.

Thanks for any suggestions,

Seth

_______________________________________________
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev

--
http://www.spatialys.com
My software is free, but my time generally not.

_______________________________________________
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev

Reply via email to