Purpose (problem description)

This page provides solution to the error message - "Null value in column 'parameter name' violates non-null constraint", which occurs during the analysis of a Sybase database extraction (see screenshot)

This error occurs when one of the views is defined with a constant column instead of the name of an existing column of a table.

This is due to a known bug in the Database Extractor, that generates an XML node with an empty resolutionName attribute in this case. Then the analyzer tries to insert an object with a NULL parameter into the local base, and fails due to the non-null contraint.

Observed in CAST AIP

 

Release
Yes/No
8.3.x(tick)
8.2.x(tick)
8.1.x(tick)
8.0.x(tick)
7.3.x(tick)
Observed on RDBMS
RDBMS
Yes/No
Oracle Server(tick)
Microsoft SQL Server(tick)
CSS3(tick)
CSS2(tick)

Step by Step scenario

  • Run analysis for a Sybase Database Extraction
Action Plan

To troubleshoot this issue, you need the following Relevant Input

 Perform the below actions:

  1. Identify the name and type of the failing object. 

    Open the analysis log and look for the SQL trace of the error. The OBJECT ID is the third parameter of the failing query. In the previous screenshot, it is 28274. 

    Run the below query on your Local Base 

    Identify name and type
    set search_path=<YOUR LOCAL BASE>;
     
    select k.keynam, t.typnam from keys k join typ t on k.objtyp = t.idtyp where k.idkey=<OBJECT_ID>;  

     This query will give you the name and the type of the faulty object. Now you can proceed to step 2.

  2. Find out the corresponding SRC and UAX files.

    Open Notepad++, type CTRL-H.

    • As a file filter, type VASTCreate<OBJECT_TYPE>.*src. For example, if the object is a View, type VASTCreateView*.src as a file filter
    • In the Search pattern field, type the name of the object

      Notepad++ will find the SRC file containing the source code for your object. If it does not, please contact  CAST Technical Support.
      The UAX file is the one with the same name, but with uax extension. You may proceed to step 3.

     

  3. Inspect the UAX File. If in the UAX file you find an empty resolutionName attribute, then proceed to step 3. Else please contact CAST Technical Support. 

    Open the UAX File in Notepad++. Inside, you should find a XML Markup with an empty resolutionName attribute. If it is not the case, please contact  CAST Technical Support.  

    The analysis fails because of this empty attribute. You can now proceed to step 4, Fill-in the empty resolutionName attribute with the name of the constant you find in the SRC file.

     

  4. Fill-in the empty resolution name attribute with the name of the constant you find in the SRC file.
     

    Open the SRC File. In the script, there should be a constant string at some point. It is surrounded by quotes.

     

    Example : below, "+" is a constant string

     

    Script example
    CREATE VIEW MYVIEW AS SELECT "+", COLUMN1, COLUMN2 FROM MYTABLE;

     

    Fill-in the empty resolutionName attribute in the UAX File with the constant string you found in the SRC File.

     

    You can relaunch analysis based on this modified extraction, the error will disappear


  5. If the above points do not resolve the issue, contact CAST Technical Support with Relevant Input.

Notes / Comments

Ticket # 6780

Related Pages