PostgreSQL - nk_curve type setup causes DWH job to fail with error "malformed array literal"
search cancel

PostgreSQL - nk_curve type setup causes DWH job to fail with error "malformed array literal"

book

Article ID: 428102

calendar_today

Updated On:

Products

Clarity PPM SaaS Clarity PPM On Premise

Issue/Introduction

After enabling DWH Sync and SQL Curve, the Load DWH - Full and Incremental fails with error: 

ENCOUNTERED EXCEPTION WHILE INSERTING INTO DWH_FIN_PLAN_CRV_FACTS. malformed array literal: "100000"

If we disable DWH Sync and SQL Curve, the job works

Environment

All Supported Clarity Releases with PostgreSQL

Cause

nk_curve type - attribute curve_sum is missing from the database

Resolution

  1. Run the query to ensure you are seeing the records for nk_curve. Make sure you replace 'niku' and 'ppm_dwh' with the correct schema names
    SELECT 
        n.nspname AS schema_name,
        t.typname AS type_name,
        a.attname AS attribute_name,
        pg_catalog.format_type(a.atttypid, a.atttypmod) AS attribute_type,
        a.attnum AS attribute_order
    FROM pg_type t
    JOIN pg_namespace n ON n.oid = t.typnamespace
    JOIN pg_attribute a ON a.attrelid = t.typrelid
    WHERE t.typname = 'nk_curve'
    AND n.nspname IN ('niku', 'ppm_dwh') ----replace 'niku' and 'ppm_dwh' 
    ORDER BY n.nspname, a.attnum;
  2. Compare to a working Clarity environment on the same version. 
  3. If you determine that there is missing attribute, then run the DWH link command to recreate it:
    admin create-db-link
  4. Make sure the command runs and no errors
  5. Make sure the nk_curve type has all the correct attributes
  6. Run Load Data Warehouse - Full and Incremental