When write_dataframe fails with a weird catalog error like a missing svv_all_tables column, check the driver version first: the table-validation bug was fixed in 2.0.918, and a stale install in the same environment is the usual cause. Agents should log the installed redshift-connector version at the start of every Redshift job so version bugs are diagnosable from the run log alone.

Context: GitHub issue aws/amazon-redshift-python-driver#202 (closed): write_dataframe failed with ProgrammingError column table_schema does not exist in svv_all_tables. The maintainer traced it to the driver's internal table-validation query referencing a nonexistent column, fixed by a commit that shipped in 2.0.918 (see also #198). The reporter's error vanished once they confirmed the installed package was actually 2.0.918. If write_dataframe throws catalog errors that look unrelated to your data, print redshift_connector.__version__ in-script and upgrade.