am running superset and Dremio [ image: dremio/dremio-oss:4.9] on docker containers…
Have installed all dependencies and drivers on superset docker
unixodbc-dev
unixodbc-bin
unixodbc
RUN pip install pyodbc
RUN pip install sqlalchemy_dremio
Dremio is having
“ExposedPorts”: {
“31010/tcp”: {},
“45678/tcp”: {},
“9047/tcp”: {}
However, not able to connect to dremio using
dremio://xxx:xx@localhost:31010/dremio
Its says able to connect to this localhost… but port is closed.
But able to able to connect over JDBC
import matplotlib.pyplot as plt; plt.rcdefaults()
import pyodbc
import pandas
host = ‘localhost’
port = 31010
uid = ‘jgeorgek’
pwd = ‘Passw0rd’
driver = “/Library/Dremio/ODBC/lib/libdrillodbc_sbu.dylib”
cnxn=pyodbc.connect(“Driver={};ConnectionType=Direct;HOST={};PORT={};AuthenticationType=Plain;UID={};PWD={}”.format(driver,host,port,uid,pwd),autocommit=True)
sql = ‘’‘SELECT * FROM Vehicle_curatedData’’’
data = pandas.read_sql(sql,cnxn)
I do not see any error on the docker logs on superset as well. How to debug ? please advice thanks
@jeffpower
Have you checked the Dremio logs? In case of Docker, it should go to stdout
hi Balaji,
thanks for the response.
i changed to use host name and please. note now flight is fine - dremio+flight://xx:xx@dremio:32010/dremio …however dremio://xxx:XXXXXXXXXX@localhost:31010/dremio is still issue
now from the UI below is the error
ERROR: Connection failed, please check your connection settings
From superset docker logs
2021-04-05 00:27:52,036 [UserServer-1] INFO c.d.sabot.rpc.user.UserRPCServer - [USER]: Channel closed /172.25.0.5:31010 <–> /172.25.0.2:56174 (user client)
2021-04-05 00:27:52,036 [UserServer-1] WARN c.d.e.s.o.SessionOptionManagerFactoryImpl - Could not find session with sessionId d84b6cc6-cca0-456e-8290-5431c5cf4daa.
2021-04-05 00:27:52,036 [UserServer-1] INFO com.dremio.ConnectionLog - [d84b6cc6-cca0-456e-8290-5431c5cf4daa] Connection Closed
from dremio
2021-04-05 00:29:09,130 [UserServer-1] INFO c.d.sabot.rpc.user.UserRPCServer - [USER]: Channel closed /172.25.0.5:31010 <--> /172.25.0.2:56190 (user client)
2021-04-05 00:29:09,131 [UserServer-1] WARN c.d.e.s.o.SessionOptionManagerFactoryImpl - Could not find session with sessionId 4d189d0e-825c-43e9-8c93-fb26a0da349b.
2021-04-05 00:29:09,132 [UserServer-1] INFO com.dremio.ConnectionLog - [4d189d0e-825c-43e9-8c93-fb26a0da349b] Connection Closed
172.25.0.1 - - [05/Apr/2021:00:29:18 +0000] "GET /apiv2/socket HTTP/1.1" 403 0 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.1.3 Safari/605.1.15"
@jeffpower
Instead of Superset, if you try a different ODBC tool, does it work?
Yes with pyodbc, its fine …able to connect …[quote=“jeffpower, post:1, topic:7235”]
import matplotlib.pyplot as plt; plt.rcdefaults()
import pyodbc
import pandas
host = ‘localhost’
port = 31010
uid = ‘xx’
pwd = ‘xxxx’
driver = “/Library/Dremio/ODBC/lib/libdrillodbc_sbu.dylib”
cnxn=pyodbc.connect(“Driver={};ConnectionType=Direct;HOST={};PORT={};AuthenticationType=Plain;UID={};PWD={}”.format(driver,host,port,uid,pwd),autocommit=True)
sql = ‘’‘SELECT * FROM Vehicle_curatedData’’’
data = pandas.read_sql(sql,cnxn)
[/quote]
@jeffpower Would this Tutorial help?
Thanks Balaji for the response. Would like to know : what is the recommended approach for the connectivity? Flght is better than ODBC right? and we do not need both.right?
@jeffpower
If flight is possible over JDBC, use flight