Write error with spark.write against SQL Server table (via JDBC Connection)

103 Views Asked by At

We are trying to save a DataFrame in SQL Server (V2005) using the following method:

df_cards.write.jdbc(url=conn_str, table=tablename, mode='append', properties=properties)

However, we encountered the following error:

org.apache.spark.SparkSQLException: Unrecognized SQL type -151

The most puzzling part is that the data has been saved in the database.

Somebody can help us?

Thank you in advance for your help.

0

There are 0 best solutions below