Page tree
Skip to end of metadata
Go to start of metadata

The Update CAST Knowledge Base Tool is part of the CAST Management Studio.

Configuring the Update CAST Knowledge Base Tool

To configure the tool:

  • Launch the CAST Management Studio
  • Connect to the Management Service which governs the Analysis Service you want to modify
  • Open an existing Application (or create a new one) - note that the Application must use the Analysis Service you want to update - you can check this in the Execute tab of the Application editor:

  • Move to the Content Enrichment tab
  • Click the Add a new Update CAST Knowledge Base option in the Tools after Analysis section:

  • The Tool will then be displayed:

  • Enter a name for the tool "job" in the Name field and an optional description in the Description field.
  • Now you need to make a choice between how you populate the CAST Analysis Service entry tables. The tool gives you two options: By SQL query and By External Program. Each is explained below:

By SQL query

This option is the easiest to work with:

  • Ensure that the drop down selector under Insertion Mode is set to SQL queries.
  • The SQL section provides the means for you to enter an SQL script to update the CAST Analysis Service entry tables via an SQL query. Note that the server connection that is used will be the connection details defined for the parent RDBMS/CAST Storage Service on which the Analysis Service is installed - see the Services view.
  • When entering queries, you must use the following syntax - note that a template query is provided for you:
CAST Storage Service

<DML>
/

Microsoft SQL Server

<DML>
Go

Exec <Stored_Procedure>
Go

Oracle

<DML>
/

Begin
<Stored_Procedure> ;
End ;
/

Declare ErrorCode int :=0;
Begin
ErrorCode := <Function> ;
End ;
/

  • Use the Insert Variable option to insert a CAST custom variable in the SQL field. For example you may want to use a query that is saved in an SQL file on the local machine:

By External Program

This option enables you to select an External Program that will be executed when the tool job is run. This External Program should update the CAST Analysis Service entry tables when it is run:

  • Ensure that the drop down selector under Insertion Mode is set to SQL queries.*
  • Enter the full path to your External Program - note you can use the Insert Variable option to paste in a custom CAST variable.
  • Optional: enter any arguments required for the External Program (for example via the use of switches) - note you can use the Insert Variable option to paste in a custom CAST variable.

Running the Update CAST Knowledge Base Tool

When you have configured and defined your Update CAST Knowledge Base Tool, you are ready to execute the job. You can do so in two ways:

  • Using the Run Tool button in the tool itself - this will run the tool on demand:

    • A Progress dialog box will be displayed to indicate the various different steps in the execution process.
    • If the job successfully completes, the Progress dialog box will indicate this. If not, then errors may be present in your SQL queries. See Error handling for more information about how errors are handled and how you can debug them.
    • Please make sure you also update the CAST System Views AGAIN, once the job has completed.
  • Automatically as part of the execution of an Analysis - if you use the Run Analysis option or the Generate Snapshot (including an Analysis) then the Update CAST Knowledge Base Tool will also be run AFTER the analysis is complete.
Note - Before you run the tool manually, you MUST update the CAST System Views (you can do so manually by adding an Update CAST System Views Tool in the Content Enrichment tab in the Application editor) . This is essential because it is sometimes necessary to use data accessed via the CAST System Views when creating your SQL queries. As a result, having the most up-to-date information in the CAST System Views is mandatory.

What happens when an Update CAST Knowledge Base Tool is run?

When you run the Update CAST Knowledge Base Assistant tool, three things will happen:

  • Entry tables initialized - the contents of the CAST entry tables will be cleared in preparation for your new data
  • Data entry - the data in your query is then inserted into the CAST entry tables
  • Data consistency checks - checks are then carried out on the data in the entry tables that you want to execute. These checks will make sure that what you propose to do meets a set of predetermined criteria (for example if you attempt to create a parent type link (Belongs To) that makes an existing child object the parent object, and an existing parent object the child object, then this will be rejected). If an error is encountered, the job execution will be stopped and error messages will be created enabling you to debug the problem. See Error handling for more information about this. The procedure CI_CHECK_DATA will be executed to carry out the checks.
  • Data processing - finally the data inserted into the entry tables (if all checks are passed) is then processed. The procedure CI_PROCESS_DATA will be executed to process the data.

  • No labels