Server.Utils.AddTimeline
Type: Server
Adds a new timeline entry to a notebook super-timeline with results from a provided VQL query.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
NotebookId |
string | ||
Timeline |
string | SuperTimeline name | |
ChildName |
string | Name of child timeline | |
Query |
string | A query that will be parsed and run. | |
Key |
string | Sort column for time | |
MessageColumn |
string | The name of the column to appear as the message | |
RemoveLimit |
bool | If specified, we remove the limit clause before adding to the timeline. | |
Env |
json |
Source
Defined in artifacts/definitions/Server/Utils/AddTimeline.yaml.
name: Server.Utils.AddTimeline
description: |
Adds a new timeline entry to a notebook super-timeline with results
from a provided VQL query.
type: SERVER
parameters:
- name: NotebookId
- name: Timeline
description: SuperTimeline name
- name: ChildName
description: Name of child timeline
- name: Query
description: A query that will be parsed and run.
- name: Key
description: Sort column for time
- name: MessageColumn
description: The name of the column to appear as the message
- name: RemoveLimit
description: If specified, we remove the limit clause before adding to the timeline.
type: bool
- name: Env
type: json
sources:
- query: |
SELECT timeline_add(
notebook_id=NotebookId,
timeline=Timeline,
name=ChildName,
message_column=MessageColumn,
query={
SELECT * FROM query(query=if(condition=RemoveLimit,
then=regex_replace(re="(?i)LIMIT [0-9]+", replace="", source=Query),
else=Query), env=Env)
},
key=Key), RemoveLimit
FROM scope()