Assuming I have a Postgres-DB table looking like this (with with many more rows):
|------|-------|
|col1 |col 2 |
|------|-------|
|a1 |10 |
|a2 |55 |
|a3 |24 |
|------|-------|
And a List in Python with Tuples looking like this:
|------|-------|
|a1 |1 |
|a3 |2 |
|------|-------|
During runtime I now want to (inner) join the table with the list without having to persist the list as a DB object.
What does work, is to filter using the list and SQLAlchemys .in_
operator.
However when I try db.query(Table).join(list)
I get this error:
sqlalchemy.exc.NoInspectionAvailable: No inspection system is available for object of type
Of course a workaround would be to first fetch all elements from the db using the filter operator and then using python for the join...but it feels like there should be a