datavault4dbt icon indicating copy to clipboard operation
datavault4dbt copied to clipboard

Multi-active satellite: NULL rows not correctly identified

Open tkirschke opened this issue 1 year ago • 1 comments

Discussed in https://github.com/ScalefreeCOM/datavault4dbt/discussions/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().

tkirschke avatar Jul 18 '23 07:07 tkirschke

This issue is stale because it has been open for 90 days with no activity. If you would like the issue to remain open, please remove the stale label or comment on the issue. Otherwise it will be closed in 14 days

github-actions[bot] avatar Jul 08 '24 06:07 github-actions[bot]