Follow the instructions below to addto add/edit an analytic script in WSO2 BAM:
Table of Contents | ||||
---|---|---|---|---|
|
Adding an analytic script
1. Log
...
in to theBAM
...
management console, and click Analytics on the Add menu of the Main menu. That will open the Script Editor window.
2. Provide a script name, and add the required HiveQL script in the editor pane as shown below:
Info | ||
---|---|---|
| ||
For information on writing HiveQL scripts, |
...
see Hive Language Manual. |
3. Click Run 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. Else, click Yes to schedule the script before saving. For more information on scheduling,
...
see Scheduling an Analytic Script.
5. The script will be
...
added to Available Scripts
...
, where saved script are listed as show below.
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
...
:
- Go to Navigate to
<BAM_HOME>/repository/deployment/server/bam-toolbox
folder/
directory, and select the.tbox
file file you want to edit. - Open the
.tbox
file using any file archiving utility (e.g. , 7z). - Edit the script file in the toolbox according to your requirements. Scripts are saved inside the
Analytics
folder in the.tbox
file. - Once the edits are done, archive the main folder again and simply change its extension to
.tbox
. - Save the edited
.
tboxtbo
x file in the same samebam-toolbox
folder folder mentioned above and restart the server.
Editing other scripts
If you have already installed BAM, you can
...
change analytics scripts that are manually added, using the management console
...
as follows:
- Log in to the BAM management console, and select
- click List under
- in the Analytics menu in the
- the Main menu.
Select Click Edit corresponding to the script you want to edit
and click Copy as a New Script link associated with it. and as shown below.
- Do required modifications to the existing script and save it in a new name.
Note that you cannot use the management console to edit a script after it is deployed. The only want to do this through the UI is by duplicating the old script and renaming it.
Do your