I had a good google search, but I can not find the answer to this error in my case.
I do not do any joins, Im literally just trying to get everything from this table.
All other queries work fine, but this seems to mess up this error:
InvalidRequestError: Ambiguous column name 'INMPTL_WIW_BATAM_STG.pers_no' in result set! try 'use_labels' option on select statement.
Model:
batamStg = sa.Table("INMPTL_WIW_BATAM_STG", meta.metadata, sa.Column("PERS_NO", sa.types.String(),primary_key=True), sa.Column("FIRST_NAME", sa.types.String()), sa.Column("LAST_NAME", sa.types.String()), sa.Column("KNOWN_AS", sa.types.String()), sa.Column("JOB_TITLE", sa.types.String()), sa.Column("MANAGER_NAME", sa.types.String()), sa.Column("MANAGER_ID", sa.types.String()), sa.Column("MANAGER_COST", sa.types.String()), autoload=True, autoload_with=engine)
View:
btm = meta.Session.query(model.BatamStaging).all();
There is only one column named Pers_no, and all primary keys are unique.
The same error occurs if I try to set LAST_NAME as the primary key.
Has anyone else had this problem?