Skip to content

Commit fb65f76

Browse files
authored
fix: temporary Redash compatibility (#43)
1 parent e6737e6 commit fb65f76

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
from firebolt.db import connect
2+
3+
4+
class Connection:
5+
"""
6+
Compatibility layer for Redash.
7+
Will be removed once the new version using the SDK is rolled out.
8+
"""
9+
10+
def __new__(
11+
cls,
12+
host: str,
13+
port: str,
14+
username: str,
15+
password: str,
16+
db_name: str,
17+
context: str = None,
18+
header: bool = False,
19+
ssl_verify_cert: bool = False,
20+
ssl_client_cert: str = None,
21+
proxies: str = None,
22+
) -> "Connection":
23+
return connect(
24+
engine_url=host, database=db_name, username=username, password=password
25+
)

0 commit comments

Comments
 (0)