I have the following code:
engine = sqlalchemy.create_engine(connectstring, echo=_echo).connect()
md = sqlalchemy.MetaData(engine)
table = sqlalchemy.Table('table_name', md, autoload=True, autoload_with=engine)
_Session = sessionmaker(bind=engine)
session = _Session()
for row in reader:
table.insert({'key': 'value'})
session.commit()
Why does nothing get added to my table? The code runs, but the table is never updated.
reader? Is there anything in it?