Script
Script (script)
Calculated fields.
Transform Scripting json
Minimal example
actions: - script: {}JSON
{ "actions": [ { "script": {} } ]}Contents
Fields
| Field | Type | Required | Description |
|---|---|---|---|
description General | string | describe this step. | |
condition General | lua-expression (string) | Expression evaluated before anything else; when it returns false neither the optional run logic nor any let pairs execute for that event.Examples: 2 * count() | |
overwrite Output | boolean (bool) | Overwrite a field if it already exists. | |
let Script | map (string) | field-expression pairs, evaluated sequentially after the optional run snippet; each expression sees fields created earlier in the list. | |
load Runtime | path (string) | Load a file containing Lua functions into the current context ‘init.lua’ is loaded by default. Examples: /path/to/file, c:\users\joe\data\file.txt | |
run Script | multiline-text (string) | Per-event logic executed after the condition passes but before the let pairs run; it can set up state but no longer short-circuits the lets. |
General
Show fields
| Field | Type | Required | Description |
|---|---|---|---|
description | string | describe this step. | |
condition | lua-expression (string) | Expression evaluated before anything else; when it returns false neither the optional run logic nor any let pairs execute for that event.Examples: 2 * count() |
Output
Show fields
| Field | Type | Required | Description |
|---|---|---|---|
overwrite | boolean (bool) | Overwrite a field if it already exists. |
Script
Show fields
| Field | Type | Required | Description |
|---|---|---|---|
let | map (string) | field-expression pairs, evaluated sequentially after the optional run snippet; each expression sees fields created earlier in the list. | |
run | multiline-text (string) | Per-event logic executed after the condition passes but before the let pairs run; it can set up state but no longer short-circuits the lets. |
Runtime
Show fields
| Field | Type | Required | Description |
|---|---|---|---|
load | path (string) | Load a file containing Lua functions into the current context ‘init.lua’ is loaded by default. Examples: /path/to/file, c:\users\joe\data\file.txt |
Schema
Let Table
| Field | Expression |
|---|---|
event.field | value + 1 |
Key format: field. Value format: lua-expression.