SQLAlchemy - copy schema and data of subquery to another database

后端 未结 2 1650
粉色の甜心
粉色の甜心 2021-01-31 10:14

I am trying to copy data from a subquery from postgres (from_engine) to sqlite database. I can achieve this for copying a table using following command:

smeta =         


        
2条回答
  •  心在旅途
    2021-01-31 10:47

    You can also go through a pandas data frame. For example a method would use pandas.read_sql(query, source.connection) and df.to_sql(table_name, con=destination.connection).

提交回复
热议问题