-
Notifications
You must be signed in to change notification settings - Fork 21
Description
In general, it is expected that the MotherDuck connector is used to access DuckDB data sources from Tableau Desktop. This connector can be used with plain DuckDB (does not require MotherDuck token) and is confirmed to work.
However, Tableau also supports plain ODBC connections, and there is a problem discovered with connecting to DuckDB this way:
With this DSN with a few tables/schemas created:
Tableau connects to this DSN successfully, but cannot list schemas (so no tables listed too):
In the trace, it successfully lists tables with SQLTables, then lists the databases with SQLTables + SQL_ALL_CATALOGS and gets the database name - short name like test1. But then it tries to open new connection to this database, ignoring the DSN and specifying the database=test1 in the connection string. So the driver tries to open the connection using a relative path (from current working dir) to test1, so the actual file path points to c:\program files\tableau\tableau 2025.1\test1 instead of the correct C:\projects\duck\tmp\test1.db and this expectedly fails:
WebDatasources" 5e8-1924 EXIT SQLDriverConnectW with return code -1 (SQL_ERROR)
HDBC 0x00000200C3B2C160
HWND 0x000000000001000C
WCHAR * 0x00007FF8049AF648 [ -3] "******\ 0"
SWORD -3
WCHAR * 0x00007FF8049AF648
SWORD -3
SWORD * 0x0000000000000000
UWORD 0 <SQL_DRIVER_NOPROMPT>
DIAG [08003] ODBC_DuckDB->dbc
No database connection found (0)
DIAG [IM003] ODBC_DuckDB->SQLDriverConnect
IO Error: Cannot open database "c:\program files\tableau\tableau 2025.1\test1" in read-only mode: database does not exist (0)


