0

I had a doubt regarding the position of update_preimage and update_postimage in the table which contains the row_level changes in CDF . Does every update_preimage has its update_postimage right below it i.e. are they in two adjacent rows?

The reason I am asking this is because I wanted to update the sink table with the updates in the source table so I was thinking of bringing both the preimage and the postimage in the same row (maybe by using some window function) and writing a MERGE statement with preimage as the matching condition .

I tried doing the above by using a 'correaled scalar subquery' in the MERGE statement but Spark SQL has some restrictions on it.

Alex Ott
  • 80,552
  • 8
  • 87
  • 132
Karan Dhar
  • 47
  • 4
  • please show the code you tried - without it, it's not possible to understand what is wrong. Also, please describe what you want to achieve at the end – Alex Ott May 04 '23 at 06:37

0 Answers0