Load Data Warehouse (DWH) is failing with error:
ENCOUNTERED EXCEPTION WHILE MERGING INTO DWH_INV_INVESTMENT. value too long for type character varying(21)
Table and column length may vary.
This is caused by a mismatched length for an attribute, likely if the length was changed but the attribute was already added to Data Warehouse.
Release : Any
Component : CLARITY DATA WAREHOUSE
Database: Postgres
select table_name, column_name, data_type, character_maximum_length from information_schema.columns where table_name = 'dwh_inv_investment' and character_maximum_length >= xx
See also: Load DWH job frequently reported issues
Same error on the DWH_INV_TASK
ERROR: ENCOUNTERED EXCEPTION WHILE MERGING INTO DWH_INV_TASK. value too long for type character varying(255)
Where: PL/pgSQL function inline_code_block line 22 at RAISE
Use following query to identify the attribute:
select table_name, column_name, data_type, character_maximum_length from information_schema.columns where table_name = 'dwh_inv_task'