![]() UPDATE 3: After posting this issue on the SQLAlchemy github ( issue link) the SQLAlchemy devs confirmed that the query of. Is anyone familiar with the internals of SQLAlchemy to suggest how to prevent it from making this query in the first place? 08:13:03 .process_rows(result.py:1260) DEBUG: Row ('t_table2',)Īpparently when a table or other object is created in an open transaction and not committed yet, querying. In those cases, the log continues immediately like this, listing all the tables in the DB: 08:13:03 ._execute_context(base.py:1235) INFO: SELECT. Note that the code works without any problems when I run the Python script during other times of the day when I don't have those other DB transactions going on. The Python code for the insert is like this: with sqlalchemy.create_engine("mssql+pyodbc:///?odbc_connect=%s" % params).connect() as connection:ĭf.to_sql(name=my_table, con=connection, if_exists='append', index=False) My question is: Can I alter the configuration/settings of SQLAlchemy so that it does not make this query in the first place? ![]() is a view that cannot cause a deadlock which would contradict my guess of what is causing this issue. I have other "stuff" going on in the DB at this time, including some open transactions and my guess is that for whatever reason querying. ![]() I found that it hangs at this point where SQLAlchemy seems to be requesting table schema info about the entire DB: 08:12:07 ._execute_context(base.py:1235) INFO: SELECT. I turned on SQLAlchemy logging to get some more information. When the Python process runs it hangs during the insert. I have a Python process that uses SQLAlchemy to insert some data into a MS SQL Server DB.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |