I built a process using Delta Table to upsert my data with the ID_CLIENT
and ID_PRODUCT
key but I am getting the error:
Merge as multiple source rows matched
Is it possible to perform the merge with multiple conditions?
tabela_spec.alias("current") \
.merge(dfrn.alias("update"), "current.id_client = update.id_client AND current.id_product = update.id_product") \
.whenMatchedUpdateAll().whenNotMatchedInsertAll() \
.execute()