Sampling data in the graph

Siren Investigate 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, a script called 'Latest 500' is provided, which applies to a non-existent index called 'articles'. You can customize this script to apply it to your own data set.

After the custom script is saved, it is available from the dropdown menu in the Sampling in the Graph Browser section of the Options tab.

As a result of activating this script on the Options tab, users are prompted with a message when they try to import more than the specified number of records.

Prerequisites

Before you begin, ensure that:

  • An entity table or search is available in the Dashboard app.

  • You have added the data from the entity table or search to your graph. This ensures 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 the Data model application.

  7. Click the Options tab.

  8. Under the Sampling on graph section, select the script that you defined from the dropdown menu.

    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 entity table or search.