PostgresSQL - Load Data Warehouse Full failing repeatedly.
Errors in bg-dwh.log:
Couldn't execute SQL: CALL DWH_X_INV_TASK_SUM_FACTS_LOAD (P_LAST_LOAD_DATE => to_timestamp('1910/01/01 12:00:00', 'yyyy/MM/dd HH24:mi:ss')::timestamp, P_CURRENT_DIM_LOAD_DATE => to_timestamp('2020/05/25 18:00:09', 'yyyy/mm/dd HH24:MI:SS')::timestamp);
ERROR: ENCOUNTERED EXCEPTION WHILE MERGING INTO DWH_X_INV_TASK_SUM_FACTS. ON CONFLICT DO UPDATE command cannot affect row a second time
Where: PL/pgSQL function dwh_x_inv_task_sum_facts_load(timestamp without time zone,timestamp without time zone) line 78 at RAISE"
ERROR: ENCOUNTERED EXCEPTION WHILE INSERTING INTO DWH_X_INV_TASK_SUM_FACTS. duplicate key value violates unique constraint "dwh_x_inv_task_sum_facts_u1"
Where: PL/pgSQL function dwh_x_inv_task_sum_facts_load(timestamp without time zone,timestamp without time zone) line 49 at RAISE
Release : 15.8
Component : CA PPM SAAS DATA WAREHOUSE
Run the query on the database:
SELECT OBJECT_ID, OBJECT_TYPE, PERIOD_NUMBER, count(1)
from PRJ_EV_HISTORY
group by OBJECT_ID, OBJECT_TYPE, PERIOD_NUMBER having count(1) > 1