[sqlalchemy] Using sqlacodegen to generate models from Teradata database

2018-01-16 Thread Nirmalendu Diwakar
I am unable to find any resource which shows how to use sqlacodegen with Teradata. I've mentioned this problem in detail on StackOverflow at this link . I am using SQLAlchemy-Teradata

Re: [sqlalchemy] Usage of Pool.dispose() to close connections using SQLAlchemy 0.8

2018-01-16 Thread Jonathan Vanasco
On Tuesday, January 16, 2018 at 6:26:34 PM UTC-5, Mike Bayer wrote: dispose() is not needed inside of a web context. however, the kind > of web container you're using as well as if you are using something > like gevent or eventlet may be significant in why you are getting idle >

Re: [sqlalchemy] Usage of Pool.dispose() to close connections using SQLAlchemy 0.8

2018-01-16 Thread Joe Biggert
Thank you Mr. Bayer! I appreciate the detailed responses! On Tuesday, 16 January 2018 17:26:34 UTC-6, Mike Bayer wrote: > > On Tue, Jan 16, 2018 at 5:09 PM, Joe Biggert > wrote: > > Mr. Vanasco, > > > > Can you point me to where I can read more about the cases where >

[sqlalchemy] Means of determining if functions from func are aggregates?

2018-01-16 Thread Avi Blackmore
Hello, I am trying to use SQLAlchemy to generate queries against introspected tables, based on filter expressions that I parse from another domain-specific language. I have it mostly working, except that I want to be able to use aggregate-type functions in the DSL, and have them work

Re: [sqlalchemy] Usage of Pool.dispose() to close connections using SQLAlchemy 0.8

2018-01-16 Thread Mike Bayer
On Tue, Jan 16, 2018 at 5:09 PM, Joe Biggert wrote: > Mr. Vanasco, > > Can you point me to where I can read more about the cases where `.dispose()` > is required? You are correct, this is in a web context... and we are using > mod_wsgi. use cases for dispose are documented

Re: [sqlalchemy] Usage of Pool.dispose() to close connections using SQLAlchemy 0.8

2018-01-16 Thread Joe Biggert
Mr. Vanasco, Can you point me to where I can read more about the cases where `.dispose()` is required? You are correct, this is in a web context... and we are using mod_wsgi. On Tuesday, 16 January 2018 13:59:59 UTC-6, Jonathan Vanasco wrote: > > On Tuesday, January 16, 2018 at 12:33:42 PM

Re: [sqlalchemy] Alembic migrations hanging on busy RDS PostgreSQL servers

2018-01-16 Thread Mike Bayer
even recent PG's seem to still do this: https://dba.stackexchange.com/a/111092 so your only option other than downtime is to create a new table, migrate all the data towards it, then drop the old table and rename - then you'd need to restore additional data you might have lost while that

[sqlalchemy] Alembic migrations hanging on busy RDS PostgreSQL servers

2018-01-16 Thread George V. Reilly
Twice recently, on two different PostgreSQL 9.5 databases hosted at Amazon RDS, we've been unable to apply Alembic migrations. We have successfully run dozens of Alembic migrations in the past against one of these databases but those were quieter times for us. As far as I can tell, it's because

Re: [sqlalchemy] Usage of Pool.dispose() to close connections using SQLAlchemy 0.8

2018-01-16 Thread Jonathan Vanasco
On Tuesday, January 16, 2018 at 12:33:42 PM UTC-5, Joe Biggert wrote: > > we've got a wrapper around our requests that basically looks like this: > On Tuesday, January 16, 2018 at 2:34:25 PM UTC-5, Mike Bayer wrote: > > the dispose at the end is completely wrong, sorry. > ... > or if you are

Re: [sqlalchemy] Usage of Pool.dispose() to close connections using SQLAlchemy 0.8

2018-01-16 Thread Mike Bayer
On Tue, Jan 16, 2018 at 12:33 PM, Joe Biggert wrote: > We've got some legacy code using SQLAlchemy 0.8 (we're actively looking to > upgrade to the latest) and we've got a wrapper around our requests that > basically looks like this: > > > try: > # work >

[sqlalchemy] Usage of Pool.dispose() to close connections using SQLAlchemy 0.8

2018-01-16 Thread Joe Biggert
We've got some legacy code using SQLAlchemy 0.8 (we're actively looking to upgrade to the latest) and we've got a wrapper around our requests that basically looks like this: try: # work Session.commit() except: Session.rollback() raise finally: Session.remove()

Re: [sqlalchemy] Inserting Chinese characters in Oracle database

2018-01-16 Thread Stefan Schwarzer
Hi Mike, thanks again! On 2018-01-15 23:17, Mike Bayer wrote: > On Mon, Jan 15, 2018 at 3:18 PM, Stefan Schwarzer > wrote: >> On 2018-01-12 16:33, Mike Bayer wrote:> On Fri, Jan 12, 2018 at 7:14 AM, >> Stefan Schwarzer >>> wrote: > the