Adding a new Druid database on Superset fails, because the pings are unsuccessful. It turns out that pydruid's implementation of do_ping is at fault here and not Superset.
Other dialects expect do_ping to be called on a raw connection (engine.raw_connection() instead of engine.connect() or similar). In fact, we can see that sqlalchemy's pool implementation executes pings on the raw connection, which currently fails for our Druid dialect. When executing pydruid's do_ping on a raw connection we fail because the result of text(...) is not properly parsed to a str.
A simple script shows the problem; I'm setting pool_pre_ping to True here so we get an instant failure, the engine cannot connect because the ping fails.
Adding a new Druid database on Superset fails, because the pings are unsuccessful. It turns out that pydruid's implementation of
do_ping
is at fault here and not Superset.Other dialects expect
do_ping
to be called on a raw connection (engine.raw_connection()
instead ofengine.connect()
or similar). In fact, we can see that sqlalchemy's pool implementation executes pings on the raw connection, which currently fails for our Druid dialect. When executing pydruid'sdo_ping
on a raw connection we fail because the result oftext(...)
is not properly parsed to astr
.A simple script shows the problem; I'm setting
pool_pre_ping
toTrue
here so we get an instant failure, the engine cannot connect because the ping fails.