So, I have some results that I got from the install table, for example:
install = metadata.tables['install'] results = session.query(install)
I would like to insert the same results into the install_archive table.
I am not quite sure how to do this because I do not want to duplicate the schema by defining an install-archive object and then analyzing the results. I believe that I do not use ORM because I am just thinking (is this the right term?) The tables and requests them.
All the tutorials that I see use ORM.
The slow way to do this, in psudocode, would be:
for id in result.all(): install_archive.insert(install(id))
Thanks in advance!
python sql mysql sqlalchemy
0atman
source share