Sampling data in the graph

Siren provides methods to improve system performance for large volumes of data. In the Graph Browser, you can set a graph expansion limit, which controls how many records can be imported into a graph from a dashboard. This is called sampling.

Sampling allows you to load a limited number of records from a data set.

By default, Siren offers to display only the first 500 records of a data set. When you try to load more than 500 records, you are prompted with a message.

You can create and apply new sampling scripts to display a different sample of data in the graph.

Prerequisites

Before you begin, ensure that:

  • A saved search is available in the Dashboard app.

  • You have added the data from the saved search to your graph to ensure that a dashboard count is available in the system and can be picked up by the script.

Steps

  1. Go to the Management app and click Scripts.

  2. In the Edit Scripts screen, search for the example script called Latest articles - default implementation.

  3. Modify the script as required.

  4. Give the modified script a new name and select Save as new script.

  5. Click Save.

  6. Open Management > Data Model page

  7. Click the Options tab.

  8. Under the Sampling on graphs section, select the script that you defined from the dropdown menu. Note: The script appears in the dropdown menu only when the getDefinition function returns applicable: true`.

The Graph Browser can now automatically apply the sampling script that is configured with the saved search. . In the ScriptIds field, specify the saved script and click Save visualization object.