ibis icon indicating copy to clipboard operation
ibis copied to clipboard

'invalid snapshot identifier' when using `read_postgres()` with DuckDB backend

Open iangow opened this issue 1 year ago • 5 comments

What happened?

I am seeing the issue described here with Ibis. It seems that DuckDB requires uses of libpq connection strings in place of URIs. Perhaps it makes sense to keep URIs in Ibis and translate behind the scenes.

https://github.com/duckdb/postgres_scanner/issues/154

What version of ibis are you using?

8.0.0

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

DuckDB and PostgreSQL

Relevant log output

No response

Code of Conduct

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

iangow avatar Feb 12 '24 19:02 iangow

Thanks for the report!

If it's not a huge burden would you mind pasting a reproducible example of what's failing?

cpcloud avatar Feb 12 '24 21:02 cpcloud

Reproducibility is tricky because of the PostgreSQL angle. Have you seen any examples in issues here before? (For example, one using a public server.) I could perhaps adapt one of those.

iangow avatar Feb 12 '24 21:02 iangow

As long as you can show some SQL and some Ibis I think I can handle a workable postgres instance.

cpcloud avatar Feb 12 '24 21:02 cpcloud

I can't reproduce this locally -- can you show the schema of the postgres table you're trying to attach to?

[ins] In [16]: con.read_postgres("postgres://postgres:[email protected]:5432/ibis_testing", "batting")
Out[16]: 
DatabaseTable: batting
  playerID string
  yearID   int64
  stint    int64
  teamID   string
  lgID     string
  G        int64
  AB       int64
  R        int64
  H        int64
  X2B      int64
  X3B      int64
  HR       int64
  RBI      int64
  SB       int64
  CS       int64
  BB       int64
  SO       int64
  IBB      int64
  HBP      int64
  SH       int64
  SF       int64
  GIDP     int64

gforsyth avatar Feb 12 '24 21:02 gforsyth

Let me work on this. I'm not seeing the issue in my reprex either.

iangow avatar Feb 12 '24 22:02 iangow

Closing this out! Please open again if you're able to reproduce.

cpcloud avatar Feb 23 '24 18:02 cpcloud