||
Skip to end of metadata
Go to start of metadata

Follow the instructions below to add/edit an analytic script in WSO2 BAM:

Adding an analytic script

1. Log in to BAM Management Console and click  Add in the Analytics menu under the Main menu. That will open the Script Editor window.

2. Provide Script Name, and add the required HiveQL script in the editor pane as shown below.

the script editor

For information on writing HiveQL scripts, see Apache Hive Language Manual.

3.Click Execute to execute the script and view results. The results appear in the panel below the script editor as shown below.

4. Click Save to save the script. Click No in the pop up dialog box if it is not required to schedule the script immediately. Otherwise click Yes to schedule the script before saving. For more information on scheduling, see Scheduling an Analytic Script.

5. Under the Analytics menu of the Main menu, click List to view the added script as follows.

available scripts

Editing an analytic script

There are two ways to edit an analytic script as follows.

Editing scripts installed with toolboxes

Follow the instructions below to edit a script that came with a BAM toolbox.

Editing manually

Follow the steps below to edit the toolbox scripts manually.

  1. Go to <BAM_HOME>/repository/deployment/server/bam-toolbox folder and select the .tbox file you want to edit.
  2. Open the .tbox file using any file archiving utility (e.g., 7z).
  3. Edit the script file in the toolbox according to your requirements. Scripts are saved inside Analytics folder in the .tbox file.
  4. Once the edits are done, archive the main folder again and simply change its extension to .tbox.
  5. Save the edited .tbox file in the same bam-toolbox folder mentioned above and restart the server.
Editing using the management console

If you have already installed BAM, you can change analytics scripts of toolboxes, using the management console as follows.

  1. Log in to the BAM management console and click List in the Analytics menu in the Main menu.
  2. Select the script you want to edit and click the Copy as a New Script link associated with it. 

    You cannot use the management console to edit a script after it is deployed. The only way to do this through the UI is, by duplicating the old script and renaming it

  3. Do required modifications to the existing script and save it in a new name.

Editing other scripts 

Follow the steps below to edit other analytic scripts using the management console.

  1. Log in to the BAM management console and click List in the Analytics menu in the Main menu.

  2. Select the script you want to edit and click the Edit link associated with it. 
    edit analytic script using the management console
  3. Do required modifications to the existing script and save it.
  • No labels