Notebook writes data to the Azure database appears The connection is closed

夏 辉 26 Reputation points
2022-09-13T01:58:59.627+00:00

It's been going on for days and it hasn't gotten any better. The database also could not find a restart button
There are no problems with reading.

python :

usersdf.write \
.format("com.microsoft.sqlserver.jdbc.spark") \
.mode("append") \
.option("schemaCheckEnabled", False) \
.option("url", "jdbc:sqlserver://xxxx.database.windows.net:1433;database=xxxx") \
.option("dbtable", "xxxx") \
.option("user", "xxxxx") \
.option("password", "xxxx") \
.save()

error:

Py4JJavaError Traceback (most recent call last)

Azure Databricks
Azure Databricks
An Apache Spark-based analytics platform optimized for Azure.
2,272 questions
{count} votes

1 answer

Sort by: Most helpful
  1. 夏 辉 26 Reputation points
    2022-09-20T03:03:41.603+00:00

    The problem has been solved
    The dataframe and DB data types are inconsistent

    1 person found this answer helpful.

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.