This documentation is for using the tool in the legacy CAST Management Studio. You should, wherever possible, use Console to run your analyses and the KB Update SQL Tool - see Application - Config - Update Application schema.

Configuring the tool

To configure the tool:

  • Launch the CAST Management Studio
  • Connect to the Management Service which governs the Analysis schema 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 KB Update SQL Tool - CI 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 KB Update SQL Tool - CI entry tables via an SQL query. Note that the server connection that is used will be the connection details defined for the CAST Storage Service on which the Analysis schema 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>
/

  • 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 KB Update SQL Tool - CI 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 KB Update SQL Tool

When you have configured and defined your KB Update SQL 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 KB Update SQL Tool - 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 KB Update SQL 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.