You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When for two last records in stage for one src_dfk has not been changed src_sfk and between previous and current data processing for this particular src_dfk nothing changed eff_sat always insert one additional record to table.
Expected behavior
Records like below should not been added all the time when I run dbt
customer_hk
organisation_hk
start_date
end_date
load_date
003dd617-c12d-444f-f9c8-0f717c3fa982
e4da3b7f-bbce-2345-d777-2b0674a318d5
2024-04-21
9999-12-31
2024-04-24 08:02:21.036765 +00:00
003dd617-c12d-444f-f9c8-0f717c3fa982
e4da3b7f-bbce-2345-d777-2b0674a318d5
2024-04-19
2024-04-21
2024-04-24 08:02:28.049750 +00:00
003dd617-c12d-444f-f9c8-0f717c3fa982
e4da3b7f-bbce-2345-d777-2b0674a318d5
2024-04-21
9999-12-31
2024-04-24 08:02:37.983116 +00:00
Additional context
Not sure but I think this is because there is also same load_date for records and in final query partition by and order in this shape is not enough
latest_records AS (
SELECT*FROM (
SELECTb.CUSTOMER_ORGANISATION_HK, b.CUSTOMER_HK, b.ORGANISATION_HK, b.START_DATE, b.END_DATE, b.EFFECTIVE_FROM, b.LOAD_DATE, b.RECORD_SOURCE,
ROW_NUMBER() OVER (
PARTITION BY b.CUSTOMER_ORGANISATION_HKORDER BYb.LOAD_DATEDESC
) AS row_num
FROM"dbt_dv"."dv"."eff_sat_customer_organisation"AS b
where customer_hk in (select customer_hk fromstage.stage_organisation_customerwhere customer_id in (9491))
) AS inner_rank
WHERE row_num =1
)
Thanks for this report. If possible can you please edit your post and format your data as tables and code as code snippets using markdown? This would make it easier to read and understand what the issue is.
If not we can edit your post for you however this will delay the process.
Describe the bug
When for two last records in stage for one src_dfk has not been changed src_sfk and between previous and current data processing for this particular src_dfk nothing changed eff_sat always insert one additional record to table.
Environment
dbt version: 1.7.8
automate_dv version: 0.10.2
Database/Platform: postgres
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Records like below should not been added all the time when I run dbt
Additional context
Not sure but I think this is because there is also same load_date for records and in final query partition by and order in this shape is not enough
AB#5346
The text was updated successfully, but these errors were encountered: