Multi-active satellite: NULL rows not correctly identified
tkirschke opened this issue · comments
Discussed in #96
Originally posted by cmettler July 17, 2023
Hey Scalefree Team,
i am finishing a sqlserver adapter based on the previous sqlserver branch. I am trying to understand the ma sat template from the other adapters.
if i understand the template code + remarks correct the hashdiff should be something like the attached sample sql queries.
All three queries would create the same hashhdiff but for different ma groups. The delta check would not work.
But if i include the multi active key in the payload the hashdiffs would be different for the delta check to work.
I think this should be documented in the wiki or the ma keys automatically added to the hashdiff calc if not explicitly added in the src_payload. Or did i miss something else ?
Kind Regards,
Christoph
masat.sql.txt
To-Do: Change Multi Active Hashdiff calculation to properly identify NULL rows. Do that, by replacing the "NULLIF" around the "CONCAT()" by a "REPLACE()" to avoid NULL input to STRING_AGG() and LISTAGG().