[sqlalchemy] ORM insert: How to insert into a table with Identity column in Redshift database.

2018-12-09 Thread Ved Bhatnagar
Hi, How can I use ORM insert (session.add(object)) to insert values in a table with identity column in redshift database? Regards, Ved -- SQLAlchemy - The Python SQL Toolkit and Object Relational Mapper http://www.sqlalchemy.org/ To post example code, please provide an MCVE: Minimal, Comple

[sqlalchemy] Redshift orm insert without passing auto generated primary key

2018-12-09 Thread Ved Bhatnagar
Hi, I am getting seq table error, when trying to use orm insert on redshift table with identity column. Can some point me to a solution? Regards, Ved -- SQLAlchemy - The Python SQL Toolkit and Object Relational Mapper http://www.sqlalchemy.org/ To post example code, please provide an MCVE:

Re: [sqlalchemy] Re: ORM: read from view but write into separate table

2018-12-09 Thread Mike Bayer
On Sun, Dec 9, 2018 at 11:22 AM Stanislav Lobanov wrote: > > Hello, i have one more question: > > there is a Child definition: > > class Child(VersionedStartEnd, Base): > __tablename__ = "child" > > id = Column(Integer, primary_key=True, autoincrement=True) > start = Column(DateTime, p

Re: [sqlalchemy] Re: ORM: read from view but write into separate table

2018-12-09 Thread Stanislav Lobanov
Hello, i have one more question: there is a Child definition: class Child(VersionedStartEnd, Base): __tablename__ = "child" id = Column(Integer, primary_key=True, autoincrement=True) start = Column(DateTime, primary_key=True) end = Column(DateTime, primary_key=True) data = Co