On Linux, it just says install ODBC Driver. But doesnt say, anything on how to configure the DSN Settings. Can you please provide some documentation on how to Connect to DremIO Dataset from Superset on Linux.
Your ODBC client tools will reference a couple of files when trying to connect to Dremio: odbc.ini and odbcinst.ini. The Dremio driver ships with examples of these, though I’m not sure if after the rpm package has been converted to .deb (using alien), if it installs these system-wide.
I am getting same > /var/lib/dpkg/info/dremio-odbc.postrm: line 2: [: upgrade: integer expression expected
error for installing dremio-odbc driver on linux through alien after converting the .deb to .rpm package.
For me on Ubuntu 18.04, it seems driver has been installed:
sudo alien -i dremio-odbc-1.4.2.1003-1.x86_64.rpm
Warning: Skipping conversion of scripts in package dremio-odbc: postinst postrm
Warning: Use the --scripts parameter to include the scripts.
dpkg --no-force-overwrite -i dremio-odbc_1.4.2.1003-2_amd64.deb
dpkg: warning: downgrading dremio-odbc from 1.5.1.1001-2 to 1.4.2.1003-2
(Reading database ... 240596 files and directories currently installed.)
Preparing to unpack dremio-odbc_1.4.2.1003-2_amd64.deb ...
Unpacking dremio-odbc (1.4.2.1003-2) over (1.5.1.1001-2) ...
Setting up dremio-odbc (1.4.2.1003-2) ...
Processing triggers for libc-bin (2.27-3ubuntu1.3) ...
But in /opt/dremio-odbc/lib64/dremio.drillodbc.ini it shows only:
and in /etc/odbcinst.ini only MS ODBC driver is listed.
[ODBC Driver 17 for SQL Server]
Description=Microsoft ODBC Driver 17 for SQL Server
Driver=/opt/microsoft/msodbcsql17/lib64/libmsodbcsql-17.7.so.2.1
UsageCount=1
When I try to connect the ODBC it gives me this error:
Traceback (most recent call last):
File "connect.py", line 30, in <module>
cnxn=pyodbc.connect(dsn='Dremio ODBC 64-bit',autocommit=True)
pyodbc.InterfaceError: ('IM002', '[IM002] [unixODBC][Driver Manager]Data source name not found and no default driver specified (0) (SQLDriverConnect)')
And in connection with driver="/opt/dremio-odbc/lib64/libdrillodbc_sb64.so" it says:
Traceback (most recent call last):
File "connect.py", line 31, in <module>
cnxn=pyodbc.connect('Driver=driver;SERVER=localhost;PORT=9047;DATABASE=Samples;UID=user;PWD=password;')
pyodbc.Error: ('01000', "[01000] [unixODBC][Driver Manager]Can't open lib 'driver' : file not found (0) (SQLDriverConnect)")
And if I use conn with cnxn=pyodbc.connect(dsn='Dremio ODBC 64-bit',autocommit=True)
Traceback (most recent call last):
File "connect.py", line 30, in <module>
cnxn=pyodbc.connect(dsn='Dremio ODBC 64-bit',autocommit=True)
pyodbc.InterfaceError: ('IM002', '[IM002] [unixODBC][Driver Manager]Data source name not found and no default driver specified (0) (SQLDriverConnect)')
You can get this script to run successfully on Ubuntu by changing all instances of single brackets to double ( [ → [[ ; ] → ]] ). The suggestions of adding the Dremio driver info to your ODBC config files will accomplish the same work.