ibis icon indicating copy to clipboard operation
ibis copied to clipboard

Add Option to Pass psychopg2 Connection

Open gabeschulman opened this issue 10 months ago • 1 comments

Is your feature request related to a problem?

No response

What is the motivation behind your request?

I'd like to be able to use ibis with my company's authorization pattern for our Postgres instance.

Describe the solution you'd like

Currently I work with an auth pattern that requires SSL certificates and AWS role info to connect to an aurora Postgres database. I am able to pass connections generated using psychopg2 into methods like polars.read_database or pandas.read_sql, but for ibis I can only pass connection string params (which doesn't work for my use case). It would be great to have the option to pass a psychopg2 connection object to ibis and work with my database that way.

What version of ibis are you running?

8.0.0

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

Postgresql

Code of Conduct

  • [X] I agree to follow this project's Code of Conduct

gabeschulman avatar Apr 25 '24 14:04 gabeschulman

+1

sidhreddy avatar Apr 26 '24 17:04 sidhreddy

This was fixed in #9603 - as of ibis 9.2 you can create an ibis connection from an existing psycopg2 connection like

con = ibis.postgres.from_connection(your_pg_connection)

jcrist avatar Jul 23 '24 15:07 jcrist