Cannot connect my superset to sql server.
See original GitHub issueTried the following URIs-
- mssql+pymssql://###:$$$@RS004\S16:1433/TLH_Dev
- mssql+pymssql://###:$$$@RS004\S16:1433/TLH_Dev/?charset=utf8
- mssql+pyodbc://###:$$$@RS004\S16:1433/TLH_Dev
- mssql://###:$$$@RS004\S16:1433/TLH_Dev
Expected results
Connection to the SQL Server
Actual results
It shows: For the first two URIs-
- ERROR: {“error”: “Connection failed!\n\nThe error message returned was:\n(pymssql.InterfaceError) Connection to the database failed for an unknown reason. (Background on this error at: http://sqlalche.me/e/rvf5)”, “stacktrace”: "Traceback (most recent call last):\n File "src\pymssql.pyx", line 636, in pymssql.connect\n File "src\_mssql.pyx", line 1957, in _mssql.connect\n File "src\_mssql.pyx", line 677, …
And for the other two URIs- 2. ERROR: {“error”: “Connection failed!\n\nThe error message returned was:\n(pyodbc.InterfaceError) (‘IM002’, ‘[IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified (0) (SQLDriverConnect)’) (Background on this error at: http://sqlalche.me/e/rvf5)”, “stacktrace”: "Traceback (most recent call last):\n File "D:\superset\venv\lib\site-packages\sqlalchemy\engine\base.py", line 2228, in _wrap_pool_connect\n return fn()\n File "D:\superset\venv\lib\site-packages\sqlalchemy\pool.py", line 374, in unique_connection\n return
Screenshots
Environment
- superset version:
0.35.2
- python version:
3.6
- node.js version:
node -v
- npm version:
npm -v
Checklist
- I have checked the superset logs for python stacktraces and included it here as text if there are any.
- I have reproduced the issue with at least the latest released version of superset.
- I have checked the issue tracker for the same issue and I haven’t found one similar.
Additional context
I have installed pymssql, pyodbc, mssql, in my environment and the even tried downgrading the sql alachemy. But nothing seems to work… Please help!!
Issue Analytics
- State:
- Created 3 years ago
- Comments:8 (3 by maintainers)
Top GitHub Comments
This are the steps that I used to connect to MS SQL in Azure :
1 - URI for MSSQL Azure needs the database name after the user name for example : User Name : UserName Password : TestPassword Database : presetSQL.database.windows.net Schema : TestSchema Port : 1433
The URI should be mssql+pymssql://UserName@presetSQL:TestPassword@presetSQL.database.windows.net:1433/TestSchema
2- Pass TDS version as parameter. In “Extra” Section modify engine_parameters as follow : { “metadata_params”: {}, “engine_params”: {“connect_args”: {“tds_version”: “7.0”}}, “metadata_cache_timeout”: {}, “schemas_allowed_for_csv_upload”: [] }
@villebro gave me the tips 😃 maybe it helps you too.
I am facing the same challenges and unfortunately, the above information does not help me get the MS SQL Server connection to a named instance running.
Any help would be appreciated.
Slack question: https://apache-superset.slack.com/archives/C024WU9LT54/p1650446971125369