mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-08-02 06:08:01 +00:00
pymssql and pyodbc support added (#1625)
This commit is contained in:
parent
7263510124
commit
d5e13a9d22
@ -19,8 +19,16 @@ class MssqlConfig(SQLConnectionConfig):
|
|||||||
host_port = "localhost:1433"
|
host_port = "localhost:1433"
|
||||||
scheme = "mssql+pytds"
|
scheme = "mssql+pytds"
|
||||||
service_type = "MSSQL"
|
service_type = "MSSQL"
|
||||||
|
use_pymssql: bool = False
|
||||||
|
use_pyodbc: bool = False
|
||||||
|
uri_string: str = ""
|
||||||
|
|
||||||
def get_connection_url(self):
|
def get_connection_url(self):
|
||||||
|
if self.use_pyodbc:
|
||||||
|
self.scheme = "mssql+pyodbc"
|
||||||
|
return f"{self.scheme}://{self.uri_string}"
|
||||||
|
elif self.use_pymssql:
|
||||||
|
self.scheme = "mssql+pymssql"
|
||||||
return super().get_connection_url()
|
return super().get_connection_url()
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user