Relative Content

Tag Archive for pythonsqlsqlalchemy

SQLAlchemy not executing full stored procedure

I’m using the following code to execute a SQL stored procedure from Python. The stored procedure in question iterates over a number of different insert statements contained in another table. However, when ran from Python, the stored procedure doesn’t iterate over the complete set of data.

Left outer-join sqlalchemy ORM -> get one object as result

I’m looking to replicate a SQL query I’ve been using in pgAdmin to join multiple tables and download the resulting table into a CSV file. I’ve been successful with pgAdmin and want to achieve the same result using SQLAlchemy, as my application interacts with the database through SQLAlchemy.