diff --git a/pydruid/db/sqlalchemy.py b/pydruid/db/sqlalchemy.py index ae52c7a9..35a5f09c 100644 --- a/pydruid/db/sqlalchemy.py +++ b/pydruid/db/sqlalchemy.py @@ -122,8 +122,8 @@ def do_ping(self, dbapi_connection) -> bool: Return if the database can be reached. """ try: - dbapi_connection.execute("SELECT 1") - except Exception: + dbapi_connection.execute(text("SELECT 1")) + except Exception as ex: return False return True