dbt-msft / dbt-sqlserver

dbt adapter for SQL Server and Azure SQL
MIT License
212 stars 99 forks source link

Auth with SQL login produces invalid connection string #508

Closed paulhan97 closed 1 month ago

paulhan97 commented 3 months ago

Application Name is not a connection string attribute for ODBC Drivers

In the following lines in SQLServerConnectionManager

application_name = f"dbt-{credentials.type}/{plugin_version}"
con_str.append(f"Application Name={application_name}")

The adapter is adding Application Name as a connection string parameter. If you reference Microsoft's documentation of connection string keywords it states that APP is the correct parameter when using an ODBC connector.