Column does not exist error on CreateTable
问题 I'm trying to print out DDLs for all the tables in Redshift database. My code look something like this: cnxn = engine.connect() metadata = MetaData(bind=engine, schema=SCHEMA) metadata.reflect(bind=engine) for table in metadata.sorted_tables: try: res = CreateTable(table).compile(engine) print(res) except ProgrammingError as e: print(f"Failed to compile DDL for {table}: {e}") continue I've tested this code on other redshift databases and it seems to work fine. But in this database it fails