I have recently started working on Databricks and I have been trying to find a way to perform a merge statement on a Delta table, though using an R api (preferably sparklyr). The ultimate purpose is to somehow impose a 'duplicate' constraint as described here. The aforementioned documentation describes the Python workflow :
deltaTable.alias("logs").merge(
newDedupedLogs.alias("newDedupedLogs"),
"logs.uniqueId = newDedupedLogs.uniqueId") \
.whenNotMatchedInsertAll() \
.execute()
however, I was wondering whether there is a straight-forward way to achieve this through R. Any assistance/ideas on the matter will be much appreciated since I am a new user (as mentioned above). Thanks in advance!