Re: [sqlalchemy] Multiple table dependencies using relation SQLAlchemy

2015-07-28 Thread Victor Tingström
A follow-up question: If I remove the platform from fund, how do I update the entries in ts_types? Den måndag 27 juli 2015 kl. 17:26:40 UTC+2 skrev Michael Bayer: On 7/27/15 10:56 AM, Victor Tingström wrote: Hey guys! First off, thank you for the library. Now to the problem, I'm

[sqlalchemy] Raise exception on implicit join

2015-07-28 Thread Jacob Magnusson
Hi guys, I'm trying to avoid implicit joins (i.e. more than one entry in the FROM clause) in my code and I'm wondering if you guys have a good idea on how to best achieve this. I want to raise an exception if a query changes to have more than one entry in the FROM clause. An alternative would

[sqlalchemy] session context manager

2015-07-28 Thread Chris Withers
Hi All, I'm looking to use a session as a context manager, I've found session_scope here: http://docs.sqlalchemy.org/en/latest/orm/session_basics.html#when-do-i-construct-a-session-when-do-i-commit-it-and-when-do-i-close-it ...but is there anything in the core? I find of expected a session

Re: [sqlalchemy] session context manager

2015-07-28 Thread Mike Bayer
On 7/28/15 8:11 AM, Chris Withers wrote: Hi All, I'm looking to use a session as a context manager, I've found session_scope here: http://docs.sqlalchemy.org/en/latest/orm/session_basics.html#when-do-i-construct-a-session-when-do-i-commit-it-and-when-do-i-close-it ...but is there

Re: [sqlalchemy] Transforming SQL to SQLAlchemy

2015-07-28 Thread D.S. Ljungmark
On Mon, Jul 27, 2015 at 7:36 PM, Mike Bayer mike...@zzzcomputing.com wrote: On 7/27/15 12:19 PM, D.S. Ljungmark wrote: Thanks! Going through this of how to go backwards from a query to SQLAlchemy is the part that I was missing. I'm personally not wedded to the Postgres method, actually the

[sqlalchemy] Re: Bizzarre insert behavior: NULL constraint violation with non-null value, column changes every run.

2015-07-28 Thread Bob Ternosky
Yes. In fact if I take the output parameterized SQL + values and combine them together and run vs SQL*Plus the insert works. Using this: 2015-07-28 11:12:40,844 INFO sqlalchemy.engine.base.Engine b'INSERT INTO corp.test_table (batch_id, batch_type, scheduled_date, status, emp_id, bill_per,

[sqlalchemy] Re: Bizzarre insert behavior: NULL constraint violation with non-null value, column changes every run.

2015-07-28 Thread Jonathan Vanasco
Have you tried toggling the sqlalchemy connection string? http://docs.sqlalchemy.org/en/rel_1_0/core/engines.html#sqlalchemy.create_engine.params.case_sensitive -- You received this message because you are subscribed to the Google Groups sqlalchemy group. To unsubscribe from this group and

[sqlalchemy] Bizzarre insert behavior: NULL constraint violation with non-null value, column changes every run.

2015-07-28 Thread Bob Ternosky
I'm new to SQLAlchemy and have been playing with it for a week. I've got many SELECT based pieces working and exercising properly, but have hit a huge wall when trying to test inserts. Worse, what's happening makes no sense at all. This will hopefully contain the full set of information needed.

[sqlalchemy] Re: Bizzarre insert behavior: NULL constraint violation with non-null value, column changes every run.

2015-07-28 Thread Bob Ternosky
I had not tested that parameter. But adding case_sensitive to my create_engine call with either =True or =False made no difference. On Tuesday, July 28, 2015 at 11:51:00 AM UTC-4, Jonathan Vanasco wrote: Have you tried toggling the sqlalchemy connection string?

[sqlalchemy] Re: Bizzarre insert behavior: NULL constraint violation with non-null value, column changes every run.

2015-07-28 Thread Jonathan Vanasco
Also, check this: http://docs.sqlalchemy.org/en/rel_1_0/dialects/oracle.html#identifier-casing -- You received this message because you are subscribed to the Google Groups sqlalchemy group. To unsubscribe from this group and stop receiving emails from it, send an email to

Re: [sqlalchemy] Bizzarre insert behavior: NULL constraint violation with non-null value, column changes every run.

2015-07-28 Thread Mike Bayer
Just curious, can you try out cx_Oracle 5.1.3? I've seen some problems reported with Py3K and cx_Oracle 5.2. On 7/28/15 11:17 AM, Bob Ternosky wrote: I'm new to SQLAlchemy and have been playing with it for a week. I've got many SELECT based pieces working and exercising properly, but have

Re: [sqlalchemy] Bizzarre insert behavior: NULL constraint violation with non-null value, column changes every run.

2015-07-28 Thread Bob Ternosky
That did it. 2015-07-28 12:06:16,283 INFO sqlalchemy.engine.base.Engine INSERT INTO corp.test_table (batch_id, batch_type, scheduled_date, status, emp_id, bill_per, label, log_file, debug_file, completed_date) VALUES (:batch_id, :batch_type, :scheduled_date, :status, :emp_id, :bill_per,

[sqlalchemy] Re: Bizzarre insert behavior: NULL constraint violation with non-null value, column changes every run.

2015-07-28 Thread Bob Ternosky
The actual create was done with all lowercase: CREATE TABLE test_table ( -batch_idNUMBER(10,0)NOT NULL, -batch_type NUMBER(2,0) NOT NULL, -scheduled_date DATENOT NULL, -

Re: [sqlalchemy] Raise exception on implicit join

2015-07-28 Thread David Allouche
On 28 Jul 2015, at 11:31, Jacob Magnusson m...@jacobian.se wrote: I'm trying to avoid implicit joins (i.e. more than one entry in the FROM clause) in my code and I'm wondering if you guys have a good idea on how to best achieve this. I want to raise an exception if a query changes to have

Re: [sqlalchemy] Bizzarre insert behavior: NULL constraint violation with non-null value, column changes every run.

2015-07-28 Thread Jonathan Vanasco
Glad it worked out! Sorry my suggestions didn't pan out -- 90% of oracle issues i've had have come down to some default case setting in a file I didn't know about. -- You received this message because you are subscribed to the Google Groups sqlalchemy group. To unsubscribe from this group