sfu-db / connector-x

Fastest library to load data from DB to DataFrames in Rust and Python
https://sfu-db.github.io/connector-x
MIT License
2.02k stars 163 forks source link

MSSQL trusted connection on Linux Time out #685

Open athensofamerica opened 2 months ago

athensofamerica commented 2 months ago

What language are you using?

Python.

What version are you using?

0.3.3

What database are you using?

MS SQL Server

What dataframe are you using?

Daft

Can you describe your bug?

I tried using a trusted connection to query database on Linux using daft.read_sql. It only works when I use SQLAlchemy and it times out for ConnectorX. On Windows both are working fine.

The connection string that I used is: mssql://server/database?trusted_connection=true

What are the steps to reproduce the behavior?

If possible, please include a minimal simple example including:

Database setup if the error only happens on specific data or data type

Table schema and example data

Example query / code
import daft

server = 'mysqlserverhost'
database = 'mydb'
schema = 'myschema'
table = 'mytable'

conn = f'mssql://{server}/{database}?trusted_connection=true'

query = f'SELECT * FROM {database}.{schema}.{table}'

daft.read_sql(sql=query, conn)

What is the error?

Time out: bb8 See discussion here for more details: https://github.com/sfu-db/connector-x/discussions/684