I need to update delta table based on lookup file rows .
lookup file has two columns a_acc & b_acc, it will have mulitple rows. i need to update b_acc value in delta table based on a_acc column value in lookup in delta table .
Lookup table
+------------
|a_acc|b_acc|
+-----------
| 4636|1999|
| 1023|892 |
| 3333|1111|
Delta Table
+------------
|a_acc|b_acc|
+-----------
| 4636|0123|
| 1023|843 |
| 3333|3232|
output Delta table:
+------------
|a_acc|b_acc|
+-----------
| 4636|1999|
| 1023|892 |
| 3333|1111|
For single single row i can update the values in delta table .
deltaTable.update(condition = "a_acc = '4636'",set = {"b_acc": "1999"})
But how can i loop all the value in lookup table and update correspondingly ?