'How to Merge Data to Dynamics 365 Sales from Databricks on Apache Spark

The following will allow me to Append data to the table Account in Dynamics 365 Sales:

driver = "cdata.jdbc.dynamicscrm.DynamicsCRMDriver"
url = "jdbc:dynamicscrm:RTK=524D.....;User=Username;Password=Password;URL=https://org.crm11.dynamics.com/;CRM Version=CRM Online;"

df.write.mode("append") \
    .format("jdbc") \
    .option("driver", driver) \
    .option("url", url) \
    .option("dbtable", 'Account')\
    .save()

I am applying the code using pyspark in Databricks on Apache Spark

Can someone show me how to merge to the table Account?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source