SQL Queries - CAST Knowledge Base - Queries on Module - How to cross check the results of Module Filters

Purpose of Query

This query helps us to check if the filters that have been selected in the Module configuration return rows.

Applicable CAST Version
Release
Yes/No
8.2.x(tick)
8.1.x(tick)
8.0.x(tick)
7.3.x(tick)
Applicable RDBMS
RDBMS
Yes/No
Oracle Server(tick) 
Microsoft SQL Server(question)
CSS2(tick)
Queries

If the objects are analyzed and the modules are correctly defined, run the below queries on the local database to check if the objects filter applied in the module are filtering the expected objects :

 

  1. Check if the local database contains any object resulting from the analysis job used for the module definition by using the following page:  SQL Queries - CAST Knowledge Base - Queries on objects - How to get the Number of objects per analysis units

    1. If the query shows 0 rows for the analysis units in the filter, this means that KB doesn't contain any object resulting from the job select in 'Select Source Jobs' filter : in this case, this is sufficient to explain why the user defined module is empty and you can go back to analysis log and check for any warning/errors.

    2. If the query below returns 1 row or more, this means that KB contains at least one object resulting from the job. Check other filters selected in the user module definition. 

  2. If the 'object type' is used in the module filter: Check if KB contains objects having the same type selected in the Filter by using the following :

    The object's type is identified with OBJTYP column in KEYS TABLES.

    The 'OBJTYPSTR' table contains the objects types used by CAST products.

    If, for example, in object type filter, user checks 'C# class', you can check if Kb contain C# class object typed as follow:

    Select K.IDKEY , K.KEYNAM , K.KEYTYP, K.KEYCLASS , K.OBJTYP, O.OBJTYPSTR, O.LNGSTR from <KB_NAME>.KEYS K, <KB_NAME>.OBJTYPSTR O
    where K.OBJTYP=O.OBJTYP
    and O.OBJTYPSTR like 'C# Class'

     

    1. If query returns 0 rows, this means that the local repository doesn't contain any object having the same type selected in the Filter: in this case, this is sufficient to explain why the user defined module is empty and you can go back to analysis log and check for any warning/error.

    2. If query returns 1 row or more: this means that KB contains at least one object having the same type selected in the Filter, Check other filters

  3. If a Filter on = OBJECT NAME is used in the module definition, check if KB contains object with same name as set in the filter using following :

    The object name is defined in the KEYS table, column KEYNAM.

    If, for example, the user informs name like 'A_%', check if KB contains objects having a name starting with 'A_'. Use the following query to do this check:

    Select * from <KB_NAME>.KEYS K where KEYNAM like 'A_%'

     

    1. If the query returns 0 rows, this means that KB doesn't contain any object having a name informed in the filter in this case, this is sufficient to explain why the user defined module is empty and you can go back to analysis log and check for any warning/error.

    2. If query below returns 1 row or more, this means that KB contains at least one object having name informed in the filter, Check the other filters selected in the user module definition

  4. If Filter on = OBJECT FULLNAM is used in the module definition, check if KB contains object with same Full name as set in the filter using following :


    The object Full name is defined in 'OBJFULLNAM' table: column 'FULLNAME'.

    If, for example, the object Filter was set by customer to 'Object fullnam' like '%S:\...\14859_PB_610%'. 

    Check if KB contains objects having as full name as informed in the filter name starting with 'A_'. Use the following query to do this check:

     

    Select * from <KB_NAME>.OBJFULNAM where FULLNAME like '%S:\...\14859_PB_610%'
    1. If the query returns 0 rows, this means that KB doesn't contain any object having full name as set in the filter: in this case, this is sufficient to explain why the user defined module is empty and you can go back to analysis log and check for any warning/error.

    2. If query below returns 1 row or more: this means that KB contains at least one object having full name as set in the filter, Check other filters selected in the user module definition.

       

  5.  If Filter on = OBJECT PATH is used in the module definition, check if KB contains object with same path as set in the filter using following :

    All paths resulting from analysis are stored in REFPATH table.

    If, for example, the object Filter was set by customer to 'Object path' like 'S:...\%'.

    Check if KB contains objects having path as informed in the filter name starting with 'A_'. Use the following query to do this check:

    Select * from <KB_NAME>.REFPATH where PATH like 'S:\...\%'

     

    1. If query below returns 0 rows, this means that KB doesn't contain any object having path as set in the filter in this case, this is sufficient to explain why the user defined module is empty and you can go back to analysis log and check for any warning/error.



Notes/comments
 
Related Pages