When trying to connect to a postgres table with a tsvector column, I get the following error message:
KeyError Traceback (most recent call last)
File ~/anaconda3/envs/ec_extract/lib/python3.9/site-packages/multipledispatch/dispatcher.py:269, in Dispatcher.__call__(self, *args, **kwargs)
268 try:
--> 269 func = self._cache[types]
270 except KeyError:
KeyError: (<class 'sqlalchemy.dialects.postgresql.psycopg2.PGDialect_psycopg2'>, <class 'sqlalchemy.dialects.postgresql.base.TSVECTOR'>)
During handling of the above exception, another exception occurred:
NotImplementedError Traceback (most recent call last)
***
----> 29 main_table = con.table(table_name)[columns['column_list']]
File ~/anaconda3/envs/ec_extract/lib/python3.9/site-packages/ibis/backends/base/sql/alchemy/__init__.py:438, in BaseAlchemyBackend.table(self, name, database, schema)
428 return self.database(database=database).table(
429 name=name,
430 database=database,
431 schema=schema,
432 )
433 sqla_table = self._get_sqla_table(
434 name,
...
275 (self.name, str_signature(types)))
276 self._cache[types] = func
277 try:
NotImplementedError: Could not find signature for dtype: <PGDialect_psycopg2, TSVECTOR>
I can connect to other tables and it works as expected.
I'm running ibis version 3.2.0 and sqlalchemy version 1.4.44.
I've tried to go through the source code to understand why it doesn't work, but I can't figure anything out.
According to the sqlalchemy docs tsvectors should have been supported since version 0.9.0
Thanks!