[Solved] How to print the ACTUAL SQLAlchemy query to troubleshoot: SQLAlchemy filter statement replaces filter critieria with %(column_name_1)s


It is behaving just the way it should. It’s just that how you print the query.

from sqlalchemy.dialects import postgresql 
query = statement.compile(dialect=postgresql.dialect(),compile_kwargs={"literal_binds": True})
print(query) # will print the compiled query statement againt the dialect.

1

solved How to print the ACTUAL SQLAlchemy query to troubleshoot: SQLAlchemy filter statement replaces filter critieria with %(column_name_1)s