Re: [sqlalchemy] Re: How to load data into existing database tables, using sqlalchemy?

2015-07-19 Thread Mike Bayer
On 7/19/15 4:58 PM, Ivan Evstegneev wrote: Thanks for the reply. if by online examples you mean that you're just reading blog posts and things trying to find a code snippet that matches what you're doing, then yes, that's a wasteful use of time :) Wrong! ^_^ I'm not a lazy one. I'm

Re: [sqlalchemy] Re: How to load data into existing database tables, using sqlalchemy?

2015-07-19 Thread Ivan Ogasawara
Hi Ivan, Maybe you may iterate over the system_data[table_name] to execute your conn.execute. 2015-07-19 17:58 GMT-03:00 Ivan Evstegneev bravo@gmail.com: Thanks for the reply. if by online examples you mean that you're just reading blog posts and things trying to find a code snippet

[sqlalchemy] What is sqlalchemy.util._collections.result?

2015-07-19 Thread Dirk Makowski
Hello all, some time ago I wrote a function to mogrify SA query results into a list of dicts. It uses the inspector to determine columns etc. Up until SA 0.9.9 it worked well. However, after an upgrade of SA to 1.0.6 in some circumstances I get this error: No inspection system is available

Re: [sqlalchemy] What is sqlalchemy.util._collections.result?

2015-07-19 Thread Mike Bayer
On 7/19/15 11:58 AM, Dirk Makowski wrote: Hello all, some time ago I wrote a function to mogrify SA query results into a list of dicts. It uses the inspector to determine columns etc. Up until SA 0.9.9 it worked well. However, after an upgrade of SA to 1.0.6 in some circumstances I get

Re: [sqlalchemy] Error with union() + bindparam

2015-07-19 Thread Mike Bayer
On 7/19/15 11:44 AM, Eli Collins wrote: Unfortunately for me, my actual application's text() clause is a larger, more complex bit of sql. I know it's not ideal, but is there a way to wrap the existing TextClause without having to build the whole expression programmatically? E.g. wrap/coerce

Re: [sqlalchemy] What is sqlalchemy.util._collections.result?

2015-07-19 Thread Dirk Makowski
Thank you very much. Even though I suspected that issue to be related to that chapter, in 13 years I would not have come up with your solution. You solved my problem, but I'm still curious about that class 'sqlalchemy.util._collections.result', which does not really exist. I understand that it

Re: [sqlalchemy] What is sqlalchemy.util._collections.result?

2015-07-19 Thread Mike Bayer
On 7/19/15 3:09 PM, Dirk Makowski wrote: Thanks for looking into it. Sorry about 7z, it's an archive. Please see the revised attachment. OK, that's some elaborate test script but ultimately this is your issue: if isinstance(inp, KeyedTuple): return proc_keyed_tuple(inp)

Re: [sqlalchemy] Re: How to load data into existing database tables, using sqlalchemy?

2015-07-19 Thread Mike Bayer
On 7/19/15 4:33 PM, Ivan Evstegneev wrote: Someone? Please. On Sunday, July 19, 2015 at 6:02:13 PM UTC+3, Ivan Evstegneev wrote: I have my data loaded from excel files and organized as python dict where each key is database table name and its value is defined as list

[sqlalchemy] Re: How to load data into existing database tables, using sqlalchemy?

2015-07-19 Thread Ivan Evstegneev
Someone? Please. On Sunday, July 19, 2015 at 6:02:13 PM UTC+3, Ivan Evstegneev wrote: http://stackoverflow.com/questions/31501999/how-to-load-data-into-existing-database-tables-using-sqlalchemy?noredirect=1# I have my data loaded from excel files and organized as python dict where

Re: [sqlalchemy] Error with union() + bindparam

2015-07-19 Thread Eli Collins
Unfortunately for me, my actual application's text() clause is a larger, more complex bit of sql. I know it's not ideal, but is there a way to wrap the existing TextClause without having to build the whole expression programmatically? E.g. wrap/coerce the TextClause into a ColumnElement; or

Re: [sqlalchemy] What is sqlalchemy.util._collections.result?

2015-07-19 Thread Dirk Makowski
Here's a stripped down version in a single file. It shows only a single occasion of 'result' object appearing. The longer version above shows all. On Sunday, July 19, 2015 at 9:09:01 PM UTC+2, Dirk Makowski wrote: Thanks for looking into it. Sorry about 7z, it's an archive. Please see the

Re: [sqlalchemy] What is sqlalchemy.util._collections.result?

2015-07-19 Thread Mike Bayer
On 7/19/15 4:25 PM, Dirk Makowski wrote: Thank you very much. Even though I suspected that issue to be related to that chapter, in 13 years I would not have come up with your solution. You solved my problem, but I'm still curious about that class 'sqlalchemy.util._collections.result', which

[sqlalchemy] How to load data into existing database tables, using sqlalchemy?

2015-07-19 Thread Ivan Evstegneev
http://stackoverflow.com/questions/31501999/how-to-load-data-into-existing-database-tables-using-sqlalchemy?noredirect=1# I have my data loaded from excel files and organized as python dict where each key is database table name and its value is defined as list of dictionaries (the rows)

Re: [sqlalchemy] What is sqlalchemy.util._collections.result?

2015-07-19 Thread Dirk Makowski
Happy now. Can go to sleep :) On Sunday, July 19, 2015 at 10:34:22 PM UTC+2, Michael Bayer wrote: On 7/19/15 4:25 PM, Dirk Makowski wrote: Thank you very much. Even though I suspected that issue to be related to that chapter, in 13 years I would not have come up with your solution.

Re: [sqlalchemy] Re: How to load data into existing database tables, using sqlalchemy?

2015-07-19 Thread Ivan Evstegneev
Thanks for the reply. if by online examples you mean that you're just reading blog posts and things trying to find a code snippet that matches what you're doing, then yes, that's a wasteful use of time :) Wrong! ^_^ I'm not a lazy one. I'm also reading sqla official documentation, but