Hello, I have an existing database with a table containing a vector column ('embeddings')
When I try to access the existing database with SQLAlchemy over automap_base(), I get error messages that the vector type for the column is not recognized.
This is how I try to connect:
conn_string = f"""postgresql+psycopg2:// (...)"""
engine = create_engine(conn_string)
with engine.connect() as conn:
conn.execute(text('CREATE EXTENSION IF NOT EXISTS vector'))
conn.commit()
Base = automap_base()
Base.prepare(autoload_with=engine)
session = Session(engine)
SearchTable = Base.metadata.tables[tablename]
I get the following error message:
SAWarning: Did not recognize type 'vector' of column 'embeddings'
The column is definitely a column with type vector. What is wrong in my code?
Hello, I have an existing database with a table containing a vector column ('embeddings') When I try to access the existing database with SQLAlchemy over automap_base(), I get error messages that the vector type for the column is not recognized.
This is how I try to connect:
I get the following error message:
SAWarning: Did not recognize type 'vector' of column 'embeddings'
The column is definitely a column with type vector. What is wrong in my code?