ibis-project / ibis

the portable Python dataframe library
https://ibis-project.org
Apache License 2.0
5.02k stars 585 forks source link

bug: mssql does not implement `_from_url()` #9415

Closed grieve54706 closed 2 weeks ago

grieve54706 commented 2 months ago

What happened?

The document website has a description of the MSSQL that could use a connection URL to connect. https://ibis-project.org/backends/mssql#ibis.connect-url-format

But actually backends.mssql inherits NoUrl and does not implement _from_url().

What version of ibis are you using?

9.0.0

What backend(s) are you using, if any?

MSSQL

Relevant log output

self = <ibis.backends.mssql.Backend object at 0x1388b0490>, host = 'localhost'
user = None, password = None, port = 1433, database = None, driver = None
kwargs = {'Trusted_Connection': 'yes'}

    def do_connect(
        self,
        host: str = "localhost",
        user: str | None = None,
        password: str | None = None,
        port: int = 1433,
        database: str | None = None,
        driver: str | None = None,
        **kwargs: Any,
    ) -> None:
        if user is None and password is None:
            kwargs.setdefault("Trusted_Connection", "yes")

>       con = pyodbc.connect(
            user=user,
            server=host,
            port=port,
            password=password,
            database=database,
            driver=driver,
            **kwargs,
        )
E       pyodbc.Error: ('01000', "[01000] [unixODBC][Driver Manager]Can't open lib 'None' : file not found (0) (SQLDriverConnect)")

Code of Conduct

gforsyth commented 1 month ago

Hey @grieve54706 -- thanks for opening this! This seems like a good starter issue for a new contributor, so we might leave it open for a little while, but I'm sure someone will pick it up eventually.

Let us know if it becomes a blocker for you!

grieve54706 commented 1 month ago

Hi @gforsyth,

I wish I had the time to help implement this feature. Would you mind if I submit a PR to fix it when I have some free time?

gforsyth commented 1 month ago

Hey @grieve54706! Definitely! It's possible someone else might pick it up, but I'm happy to wait on it.

pangeran-bottor commented 1 month ago

hi @grieve54706, have you already started working on this? if not and if it's ok, I would like to take on this

grieve54706 commented 1 month ago

Hi @pangeran-bottor, I'm not ready. You can take this. Thank you for your time and help.

cpcloud commented 2 weeks ago

Closed by #9894.