You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "shakeelansari63 (via GitHub)" <gi...@apache.org> on 2024/02/09 21:15:36 UTC

Re: [I] How can superset connect Azure Synapse Data Warehouse(not build-in)? [superset]

shakeelansari63 commented on issue #26739:
URL: https://github.com/apache/superset/issues/26739#issuecomment-1936613464

   Did some digging and found [this Stackoverflow question](https://stackoverflow.com/questions/57123667/sqlalchemy-error-an-attempt-to-complete-a-transaction-has-failed-no-correspond) where they have same issue.   
      
   From this I understood, the problem is with Azure Synapse Data Warehouse as it does not support Transactions. SqlAlchemy has default default transaction mode, meaning it will auto begin transactions and commit/rollback internally.   
   
   Since, Superset uses SqlAlchemy to build database connections, the issue is observed in Superset as well.    
       
   ### Solution
   The solution is also provided in same Stackoverflow, but I will put it here for future reference.    
   It is suggested to use autocommit=true for Azure SQL Database for SqlAlchemy to work properly.    
   
   So your Connection String can look like this -   
   ```
   mssql+pyodbc://user:password@myserver.sql.azuresynapse.net:1433/mydb?driver=ODBC+Driver+18+for+SQL+Server&autocommit=True
   ```   
   or
   ```
   mssql+pyodbc:///?odbc_connect=DRIVER={ODBC+Driver+18+for+SQL+Server};SERVER=tcp:myserver.sql.azuresynapse.net,1433;DATABASE=mydb;UID=user;PWD=password;Autocommit=true
   ```   
      
   *_Please try and let us know if it works for you_*


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org