I am trying to append a dataframe with several columns to a MS SQL table with a calculated field. I get the following error on attempt:
"sqlalchemy.exc.ProgrammingError: (pyodbc.ProgrammingError) ('42000', '[42000] [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]The column "Fieldname" cannot be modified because it is either a computed column or is the result of a UNION operator. (271) (SQLExecDirectW); [42000] [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Statement(s) could not be prepared. (8180)')"
This issue seems to have been addressed in the AWS sdk using the use_column_names parameter. See here - aws/aws-sdk-pandas#2170
That parameter doesn't seem to exist when using a sqlalchemy pyodbc connection. - "TypeError: to_sql() got an unexpected keyword argument 'use_column_names'"
Is there something similar that exists for a sqlalchemy pyodbc connection?