Re: [sqlalchemy] Problems reflecting "dbo" schema dynamically (ORM) in MS SQL Server

2019-11-28 Thread Felipe Araya Olea
pare(engine, reflect=True) ## OR Base = automap_base() Base.metadata = MetaData(engine, schema="dbo") Base.prepare(engine, reflect=True) All of these work for me. Hope that helps someone, and thanks Mike for the help. Kind Regards On Thursday, 28 November 2019 10:05:54 UTC, Fel

Re: [sqlalchemy] Problems reflecting "dbo" schema dynamically (ORM) in MS SQL Server

2019-11-28 Thread Felipe Araya Olea
for primary keys on each if there is no primary key > constraint coming from the table itself. > > > > > > On Wed, Nov 27, 2019, at 3:55 PM, Felipe Araya Olea wrote: > > One thing I forgot to mention. > > This is not my personal database, this is my company's databas

Re: [sqlalchemy] Problems reflecting "dbo" schema dynamically (ORM) in MS SQL Server

2019-11-27 Thread Felipe Araya Olea
.Araya", which is strange, isn't it, I don't really understand why that might be happening since the log in seems to be working. Hope you are having a good day. Looking forward to hearing back from you. On Wednesday, 27 November 2019 20:36:48 UTC, Felipe Araya Olea wrote: > > He

Re: [sqlalchemy] Problems reflecting "dbo" schema dynamically (ORM) in MS SQL Server

2019-11-27 Thread Felipe Araya Olea
est', 'BASE TABLE') INFO:sqlalchemy.engine.base.Engine:('guest', 'BASE TABLE') 2019-11-27 20:03:44,785 DEBUG sqlalchemy.engine.base.Engine Col ('TABLE_NAME',) DEBUG:sqlalchemy.engine.base.Engine:Col ('TABLE_NAME',) On Wednesday, 27 November 2019 20:02:07 UTC, Mike Bayer

[sqlalchemy] Problems reflecting "dbo" schema dynamically (ORM) in MS SQL Server

2019-11-27 Thread Felipe Araya Olea
Hello, I am having problems reflecting my tables from the MS SQL Server database that have the schema "dbo". I have tried using the following code. engine = db.create_engine("mssql+pyodbc:///?odbc_connect=%s" % params) # Engine works, because I have tested it using CORE meta =