DWH Load job fails with error: "command cannot affect row a second time"
search cancel

DWH Load job fails with error: "command cannot affect row a second time"

book

Article ID: 205594

calendar_today

Updated On:

Products

Clarity PPM SaaS Clarity PPM On Premise

Issue/Introduction

Receive below error for Full and incremental Load Data Warehouse (DWH) job.

ERROR: ENCOUNTERED EXCEPTION WHILE MERGING INTO DWH_LOOKUP_LOAD DWH_LKP_CSK_RPT_ENTITY_F_00. ON CONFLICT DO UPDATE command cannot affect row a second time
Where: PL/pgSQL function inline_code_block line 21 at RAISE

This is an Out of the Box lookup

Environment

Release : Any

Cause

Some out-of-the-box lookups are not meant to be included in the Data Warehouse. This error happens if the lookup was used in an attribute in the Investment object. 

Resolution

  1. Uncheck 'Include in Data Warehouse' for the attribute
  2. Re-run the Full Load Data Warehouse job