-
Notifications
You must be signed in to change notification settings - Fork 101
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Port is not being applied properly when using Windows Login with non-default port #496
Comments
I'm seeing this as well. Adding port to server as suggest works. |
Just stumble across this problem again and found I've already been here. I'll add that if I use sql server authentication, the non-standard port is used, however, if I use windows authentication, the non-standard port is ignored and fails to connect. As before, in the case of window authentication, adding the port to the server line resolves the problem, but this seems to be a work-around. |
Digging more this appears to start from here: dbt-sqlserver/dbt/adapters/sqlserver/sqlserver_connections.py Lines 81 to 82 in 909f61c
This ends up using open from fabric_connection_manager as @cody-scott referred to. Unfortunately, fabric does not consider the port attribute and excludes it from the con_str here: In summary, the issue is that sqlserver_connections.py does not handle 'Windows Login' and out sources it to dbt-fabric/../fabric_connection_manager.py, but that doesn't use the port attribute. I'll open an issue there and we'll see what happens. |
When calling
dbt debug
from windows using the following profile, the windows login defaults to the Fabric adapter implementation, which omits the port from the connection string.this resolves to
DRIVER={ODBC Driver 18 for SQL Server};SERVER=0.0.0.0;Database=data_base;trusted_connection=Yes;encrypt=No;TrustServerCertificate=Yes;APP=dbt-sqlserver/1.7.4;ConnectRetryCount=1
When using a the standard sql login flow, it adds the port as expected.
Solved by either adding the port to the
SERVER
line (0.0.0.0,1444
) + communicating this to users or lifting the windows login piece out of fabric into this adapter.The text was updated successfully, but these errors were encountered: