This document has not been formally reviewed for accuracy and is provided "as is" for your convenience.
Summary
Question
Query runs with the following error:
DBAPIError: (pyodbc.Error) ('54000', '[54000] [Vertica][VerticaDSII] (20) An error occurred during query execution: ERROR: Target lists can have at most 1664 entries\\n (20) (SQLExecDirectW)')
Answer
This is a PostgreSQL error (Vertica uses the PostgreSQL parser).Also, this error is produced when you are trying to display more than 1600 columns in a query. We have a 1600 limit on the number of columns there can be. There is no workaround, you will need to change the query to reduce the number of columns it is returning.