Re: [sqlalchemy] mssql+turbodbc cnnection not working when converted to .exe , however runs fine when it is in .py file

2019-10-13 Thread Pradeep Dhamale
.execute(query) #transfer dataframe to sql server df.to_sql('Tablename', connection, schema='schemaname',index=False ,if_exists='append',chunksize=5) On Friday, October 11, 2019 at 2:37:48 AM UTC+5:30, Simon King wrote: > > What is the error m

[sqlalchemy] mssql+turbodbc cnnection not working when converted to .exe , however runs fine when it is in .py file

2019-10-10 Thread Pradeep Dhamale
i have created a mssql connection using sqlalchemy : mssql+*turbodbc* engine, the script runs properly when it is a .py file , however whenever i convert the .py file to .exe using pyinstaller --one file , the exe gets generated successfully , but while executing the exe it fails. -- SQLAlc

[sqlalchemy] Re: One To Many Polymorphic Association.

2007-08-28 Thread Pradeep Jindal
n(object): > def _child(self): > if self.assoc_type='child1': > return self.child_1 > else: > return self.child_2 > child=property(_child) > > mapper(Association, assoc, properties={ > 'child_1

[sqlalchemy] Re: One To Many Polymorphic Association.

2007-08-27 Thread Pradeep Jindal
':relation(Child1, backref=backref("assoc_1", > cascade="all, delete-orphan")), > 'child_2':relation(Child2, backref=backref("assoc_2", > cascade="all, delete-orphan")), > }) > > mapper(Child1, children_1) > mapper(Child2, ch

[sqlalchemy] Re: One To Many Polymorphic Association.

2007-08-24 Thread Pradeep Jindal
to achieve backwards > > cascading (may not be the right word) which means when one deletes > > one specific child from children_1 table (for example), there should > > not be any > > association entry, which associates that child to the parent, in the > > association ta

[sqlalchemy] How to do aggregates with mapped entity objects?

2007-02-27 Thread Pradeep
I have a expenses table with a amount field. I have mapped that table to a Expense entity object. How do I sum up all the amounts using my entity object.? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "sqlalchemy"