Created
March 13, 2025 11:50
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
INSERT INTO MY__DWH.l_groups_dialogs(hk_l_groups_dialogs, hk_message_id,hk_group_id,load_dt,load_src) | |
select | |
hash(hd.hk_message_id,hg.hk_group_id), | |
hd.hk_message_id, | |
hg.hk_group_id, | |
now() as load_dt, | |
's3' as load_src | |
from MY__STAGING.dialogs as d | |
left join MY__DWH.h_groups as hg on d.message_group = hg.group_id | |
left join MY__DWH.h_dialogs as hd on d.message_id = hd.message_id | |
where d.message_group is not null and hash(hd.hk_message_id,hg.hk_group_id) not in (select hk_l_groups_dialogs from MY__DWH.l_groups_dialogs); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment