Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

All three artifacts are optional. You can have all three types or either one of them in one toolbox, and only the available artifacts will be deployed. The custom toolbox can be installed by following the steps in section, Installing custom toolbox.

Toolbox Structure

Toolbox artifacts should be placed in the structure shown below:

Analytic Artifacts
Anchor
analytic
analytic

The analytics scripts (Eg: Hive script) should be placed in the analytics folder under toolbox. All the scripts which are placed under the analytics folder will be deployed. The analyzers.properties file should be included as follows in case the script needs to be scheduled.

...

The cron property is optional. It should be mentioned in this property file if you want to schedule the script. Both scripts shown above are scheduled with cron expression '1 * * * * ? *'. If a script doesn't need to be schedules to run, avoid having the specific property in the analyzers.properties file.

Stream Definition Artifacts
Anchor
stream
stream

As shown in the structure of the toolbox, the stream definitions should be placed under streamDefn folder. The stream definitions are the definitions of your data stream published to BAM. You can have any number of stream definitions within one toolbox, but they should be defined in different files.

...

Code Block
{
                   'name':'org.wso2.bam.mystream',
                   'version':'1.0.0',
                   'nickName': 'My_Stream',
                   'description': 'This is the stream definition which I'm using to send data to bam',
                   'metaData':[
                           {'name':'clientType','type':'STRING'}
                   ],
                   'payloadData':[
                           {'name':'my_field_1','type':'STRING'},
                           {'name':'my_field_2','type':'INT'},
                           {'name':'my_field_3','type':'INT'},
                           {'name':'my_field_4','type':'STRING'}
                   ]
}

Dashboard Artifacts
Anchor
dashboard
dashboard

As shown in the toolbox structure, the dashboard artfacts should be placed under the dashboard directory. Dashboard artifcats can be for Gadget Dashboard or Jasper Dashboard or both. You need to have the respective artifacts for the dashboard in which your data is visualized. The following section describes how to include artifctas in the toolbox.

Gadget Dashboard Artifacts

Gadget Dashboard related artifacts are given below.

...

Similar to anayzers.properties file, tab1, tab2 are reference in the properties. 'dashboard.tabs.tab1.name' denotes the title of the tab denoted by reference tab1. tab1, will have the gadgets My_Gadget_1.xml, My_Gadget_2.xml in the that order. Similarly. for the tab2, the title is 'Tab-2 Title' and the gadgets will be My_Gadget_3.xml, My_Gadget_4.xml in that order.

Jasper Dashboard Artifacts

Jasper Dashboard related artifacts are given below.

...

According to the above configuration, there will be one tab and the title of that tab will be 'My Jasper Tab Title'. Associated jasper file is 'My_Jasper.jrxml'. The datasource configuration is provided by 'datasource.configuration' property.

Packing the Toolbox

After including all required artifacts as described above in a directory, archive it and change the file extension to .tbox. The name of the .tbox is taken as the name of the toolbox. You are now ready to install your toolbox. For information, refer to section Installing custom toolbox.

...