emredjan opened a new issue, #51608:
URL: https://github.com/apache/airflow/issues/51608

   ### Apache Airflow Provider(s)
   
   microsoft-mssql
   
   ### Versions of Apache Airflow Providers
   
   apache-airflow-providers-microsoft-mssql==4.4.2
   
   ### Apache Airflow version
   
   2.10.5
   
   ### Operating System
   
   RHEL 8.10
   
   ### Deployment
   
   Virtualenv installation
   
   ### Deployment details
   
   _No response_
   
   ### What happened
   
   Hi. the newly added feature in 
[#44310](https://github.com/apache/airflow/pull/44310) breaks existing 
connections if `driver` or `encrypt` parameters are used in the extras:
   
   Probably more parameters may exhibit similar errors. These extras are needed 
by the MSSQL hook, but we cannot blindly accept these will work in pymssql 
connections.
   
   Example connection:
   ```json
   {
     "conn_type": "mssql",
     "extra": {
       "driver": "ODBC Driver 18 for SQL Server",
       "encrypt": "yes",
       "sqlalchemy_scheme": "mssql+pyodbc"
     },
       "host": "xxx",
       "login": "xxx",
       "password": "xxx",
       "port": 1433,
       "schema": "master"
   }
   ```
   
   Errors when using an SQLQueryExecutor using the above connection:
   
   ```python
   File "src/pymssql/_pymssql.pyx", line 586, in pymssql._pymssql.connect
   TypeError: connect() got an unexpected keyword argument 'driver'
   
   File "src/pymssql/_pymssql.pyx", line 586, in pymssql._pymssql.connect
   TypeError: connect() got an unexpected keyword argument 'encrypt'
   ```
   
   ### What you think should happen instead
   
   These conenctions should continue working as they did in 
`apache-airflow-providers-microsoft-mssql==3.9.2`
   
   ### How to reproduce
   
   Have MSSQL connections defined with `extra` parameters
   Install `apache-airflow-providers-microsoft-mssql` >= 4.0.0
   Try an mssql hook using sqlalchemy
   
   ### Anything else
   
   _No response_
   
   ### Are you willing to submit PR?
   
   - [ ] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [x] I agree to follow this project's [Code of 
Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)
   


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to