Versions Compared

Key

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

...

Excerpt

This section explains how Squirro Script is used in Squirro.

Table of Contents

Table of Contents
outlinetrue
excludeTable of Contents

Overview

Squirro Script is available in the server-side pipeline as an enrichment type. As Squirro Script is itself implemented as a pipelet, it can also be used in the data loader using the pipelets.json file.

Server-side Enrichment

Squirro Script can be installed using the Plugin Repository as a pipelet.

Once installed, Squirro Script can be added as a pipelet step to a enrichment workflow. Follow this process:

...

any pipeline workflow. See the Pipeline Editor documentation for detailed instructions.

After dragging the step into the pipeline, use the pencil icon to open the properties. The code editor can be clicked to open a bigger editor window. See the Squirro Script Reference for what to type here.

...

Data loader pipelet

Use the pipelets.json file of the data loader and remember that this file has to be indicated to the data loader with the --pipelets-file argument. An example pipelets.json file with Squirro Script looks like this:

Code Block
languagejs
{
    "SquirroScriptPipelet": {
        "file_location": "squirro_script.py",
        "stage": "before templating",
        "config": {
            "commands": '''
                duration_hours = duration / 60
                if duration_hours > 1:
                    long_meeting = 'true'
                else:
                    long_meeting = 'false'
            ''',
        }
    },
}

...