Hubert-Dudek
Databricks MVP

please check following code:

df.write.jdbc(
     url="jdbc:sqlserver://<host>:1433;database=<db>;user=<user>;password=<password>;encrypt=true;trustServerCertificate=false;hostNameInCertificate=*.database.windows.net;loginTimeout=30;driver=com.microsoft.sqlserver.jdbc.SQLServerDriver",
     table='PatientTEST',
     mode='overwrite')


My blog: https://databrickster.medium.com/

View solution in original post