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

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 8 Next »

On this page:

Target audience:

CAST Administrators

Summary: This page provides information about using the Universal Importer to Import additional links to enrich existing data generated by CAST Analyzers.

Introduction

The Universal Importer is an API that provides the means for data to be imported into the CAST Analysis Service that can be exploited by relevant CAST products (CAST Application Analytics Dashboard, Engineering Dashboard, CAST Enlighten etc.).

Use Case: Import additional links to enrich existing data generated by CAST Analyzers

Consider a situation where you have used a standard CAST analyzer for a technology covered "out of the box". You then need to enrich the analysis data with additional links between objects that have been recorded during the analysis. The Universal Importer can do this for you. In this situation, the Universal Importer can be accessed via the Content Enrichment tab in the Application editor (CAST Management Studio). It can be configured as a "tool" to run automatically at the end of an analysis, or manually on demand.

Data can be imported from:

  • specific database tables in the Analysis Service - in this situation:
    • a custom utility or external analyzer can automatically populate the database tables with the link creation information: when the Universal Importer tool is then run, the links defined in the database tables will be created
    • a custom SQL query is configured in the Universal Importer tool that defines the links that need to be created: when the tool is run, the SQL query will be executed, populating the tables and then creating the links
  • XML based .UAX files that have been generated automatically by a custom utility/external analyzer or manually - in this situation, the .UAX files should only contain link creation information (instances): when the Universal Importer tool is run the links defined in the .UAX files will be created

Process

In this situation, you first need to ensure that you have an Application in the CAST Management Studio. Then, working in either Advanced or Expert modes in the CAST Management Studio:

  • Open your Application and navigate to the Content Enrichment tab
  • Click Add in the Tools after analysis section and select Add New Universal Importer:

  • The Universal Importer will then be displayed:

Using the Universal Importer

Database tables populated by your external analyzer

If your external analyzer outputs the results of an analysis directly into the two CAST Analysis Service tables, (see CAST Analysis Service database tables in Configuring UAX files and database tables), then you need to select the Database option in the Parameters tab (after entering a Name and Description for your "job"):

  • Next:
    • Either enter the name of your GROUPNAME directly into the Group Name field – this is specified in the GROUPNAME column in both SQL tables.
    • or click the Select option to force the CAST Management Studio to retrieve a list of available GROUPNAMEs directly from the SQL tables:
  • This will force the import of items that correspond to the GROUPNAME you specify:

  • Delete the example SQL script in the SQL section
  • Drop input data after import > Select this option if you want to force the Universal Importer to empty the two SQL tables in the CAST Analysis Service immediately after the import process has completed.
  • Once the configuration is complete, click the OK button to close the Universal Importer.

Populate database tables using an SQL query

If you want to use a simple SQL query to populate the database tables, then you need to select the Database option in the Parameters tab (after entering a Name and Description for your "job"):

  • Enter or paste in the SQL query that will populate the database tables with the information you require: an example query is provided.
  • You must enter a GROUPNAME in the GROUPNAME field: you then need to use the $(GROUPNAME) variable in the SQL query (as shown in the example query) - this variable will use the contents of the GROUPNAME field in the GUI to populate the GROUPNAME column in the database tables.
  • Drop input data after import > Select this option if you want to force the Universal Importer to empty the two SQL tables in the CAST Analysis Service immediately after the import process has completed.
  • Once the configuration is complete, click the OK button to close the Universal Importer.

Import from files

If your external analyzer outputs the results of an analysis in XML format (.UAX files) that conforms to CAST's predefined format (see .UAX files in the Configuring UAX files and database tables page), then you need to select the Files option in tool in the Parameters tab (after entering a Name and Description for your "job"):

  • Next click the Add button to add in the location of a new folder that contains the .UAX files you wish to import:

  • A new dialog will be displayed enabling you to choose the path of the folder containing your results.
  • You can add as many source folders as you require.
  • Once the configuration is complete, click the OK button to close the Universal Importer tool.

Running the tool job

The tool job will be run AFTER you do either of the following in the CAST Management Studio:

  • run an analysis (using the Run analysis option)
  • generate a snapshot (using the Take a snapshot of the application option)

You can also manually run the tool job from within the Universal Importer tool by clicking the Run Tool option (note however, that the job will be run again when you execute one of the above actions):

  • No labels