[sqlalchemy] Inserting values into inherited table not working showing the parent table attribute not present in the child table.

2019-11-14 Thread Balu krishnan
Hi Friends, I am new to SQLAlchemy and trying to do with the inheriting property ( from using postgresql_inherits ). Code for creating a table and insert table is showing below, *models.py* > Parent_Table = sqlalchemy.Table( > "Parent_Table", > metadata, >

Re: [sqlalchemy] Oracle wallets + proxy authentication with arguments encoded as strings in URL

2019-11-14 Thread Chris Stephens
"oracle://[proxy_to_user]@my_wallet" worked! Thanks again. On Thu, Nov 14, 2019 at 2:14 PM Mike Bayer wrote: > > > On Thu, Nov 14, 2019, at 2:52 PM, Chris Stephens wrote: > > I'm attempting to make use of an Oracle wallet with proxy authentication > passed as strings in URL. > > The

Re: [sqlalchemy] Oracle wallets + proxy authentication with arguments encoded as strings in URL

2019-11-14 Thread Mike Bayer
On Thu, Nov 14, 2019, at 2:52 PM, Chris Stephens wrote: > I'm attempting to make use of an Oracle wallet with proxy authentication > passed as strings in URL. > > The documentation states: > > "*Changed in version 1.3: *the cx_oracle dialect now accepts all argument > names within the URL

[sqlalchemy] Oracle wallets + proxy authentication with arguments encoded as strings in URL

2019-11-14 Thread Chris Stephens
I'm attempting to make use of an Oracle wallet with proxy authentication passed as strings in URL. The documentation states: "Changed in version 1.3: the cx_oracle dialect now accepts all argument names within the URL string itself, to be passed to the cx_Oracle DBAPI. As was the case earlier

Re: [sqlalchemy] Large RAM usage in bulk_insert_mappings

2019-11-14 Thread James Fennell
Because the memory spike was so bad (the application usually runs at 250mb RAM, and it went up to a GB during this process), I was able to find the problem by running htop and using print statements to discover where in the execution the Python code was when the RAM spike happened. I

Re: [sqlalchemy] Large RAM usage in bulk_insert_mappings

2019-11-14 Thread Soumaya Mauthoor
What did you use to profile memory usage? I've recently been investigating memory usage when loading data using memory_profiler and would be interested to find out about the best approach On Thu, 14 Nov 2019, 17:16 James Fennell, wrote: > Hi all, > > Just sharing some perf insights into the

[sqlalchemy] Large RAM usage in bulk_insert_mappings

2019-11-14 Thread James Fennell
Hi all, Just sharing some perf insights into the bulk operation function bulk_insert_mappings. I was recently debugging a SQL Alchemy powered web app that was crashing due to out of memory issues on a small Kubernetes node. It turned out to be "caused" by an over optimistic invocation of

Re: [sqlalchemy] How to kill a MySQL process on keyboard Interrupt?

2019-11-14 Thread Marcin Koziej
‐‐‐ Original Message ‐‐‐ On Thursday, November 14, 2019 3:22 PM, Mike Bayer wrote: > that's the driver you're using which would not be allowing keyboard interrupt > to go through. > > I just tried this with mysqlclient and pymysql and I would assume you're > using mysqlclient as it

Re: [sqlalchemy] How to kill a MySQL process on keyboard Interrupt?

2019-11-14 Thread Mike Bayer
On Thu, Nov 14, 2019, at 3:24 AM, Marcin Koziej wrote: > (Crossposting from Stackoverflow, where I unfortunately didn't get any > answers: > https://stackoverflow.com/questions/58837864/sqlalchemty-how-to-kill-a-mysql-process-on-keyboard-interrupt > ) > > Hello! > > I'm using SQLAlchemy

Re: [sqlalchemy] How to kill a MySQL process on keyboard Interrupt?

2019-11-14 Thread Marcin Koziej
Wow! Thank You so much for pointing me these! --  Marcin Koziej GPG key: https://go.cahoots.pl/gpg/  Ϟ  Twitter: @movonw ‐‐‐ Original Message ‐‐‐ On Thursday, November 14, 2019 2:31 PM, Simon King wrote: > For what it's worth, you can read how the mysql command line does it here: > >

Re: [sqlalchemy] How to kill a MySQL process on keyboard Interrupt?

2019-11-14 Thread Simon King
For what it's worth, you can read how the mysql command line does it here: https://github.com/mysql/mysql-server/blob/8.0/client/mysql.cc#L1484 On Thu, Nov 14, 2019 at 1:21 PM Simon King wrote: > > According to >

Re: [sqlalchemy] How to kill a MySQL process on keyboard Interrupt?

2019-11-14 Thread Simon King
According to https://dev.mysql.com/doc/refman/8.0/en/information-functions.html#function_connection-id, "SELECT connection_id()" should give you the answer. Simon On Thu, Nov 14, 2019 at 12:13 PM Marcin Koziej wrote: > > I don't know how to do this using other DBAPIs, but I thought that if

Re: [sqlalchemy] How to kill a MySQL process on keyboard Interrupt?

2019-11-14 Thread Marcin Koziej
I don't know how to do this using other DBAPIs, but I thought that if command line mysql client has such behaviour, it should be possible also using the library. I was thinking about finding the process in SHOW PROCESSLIST and killing it, but it seems hacky and I am not sure if I can find the

Re: [sqlalchemy] How to kill a MySQL process on keyboard Interrupt?

2019-11-14 Thread Simon King
I'm not sure this is even possible. Ignoring SQLAlchemy, do you know how you would do it using any MySQL DBAPI library (mysqlclient, PyMySQL, etc.)? Maybe you could do something creative where you capture the PID when the connection is created, and on Ctrl-C, send a "KILL pid" command. I don't

[sqlalchemy] How to kill a MySQL process on keyboard Interrupt?

2019-11-14 Thread Marcin Koziej
(Crossposting from Stackoverflow, where I unfortunately didn't get any answers: https://stackoverflow.com/questions/58837864/sqlalchemty-how-to-kill-a-mysql-process-on-keyboard-interrupt ) Hello! I'm using SQLAlchemy 1.3.10 to run a bunch of SQL statements on Percona Server 5.7.27. I do not