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.
Release | Yes/No |
---|---|
8.3.x | |
8.2.x | |
8.1.x | |
8.0.x | |
7.3.x |
RDBMS | Yes/No |
---|---|
Oracle Server | |
Microsoft SQL Server | |
CSS3 | |
CSS2 |
Step by Step scenario
- Run analysis for a Sybase Database Extraction
To troubleshoot this issue, you need the following Relevant Input
- 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 typeset 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.
- 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.
- 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.
- 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 exampleCREATE 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
If the above points do not resolve the issue, contact CAST Technical Support with Relevant Input.
Ticket # 6780