Atlantiraptor Docs

source

Type: Plugin · Category: server

Retrieve rows from an artifact’s source.

This plugin is mostly useful in notebooks. It attempts to do the right thing automatically by inferring many parameters from its execution environment.

The goal with this plugin is to reduce the boiler plate code required by inferring many of the parameters from the notebook environment. The source() plugin serves as a proxy to other more specific plugins such as hunt_results() and flow_results().

For example, when running within a collection notebook, the GUI will automatically pass the ClientId, FlowId and Artifact parameters to the notebook environment. Therefore it is not necessary to specify those at all:

-- Artifact, ClientId and FlowId are populated from the notebook context.
SELECT * FROM source()

On the other hand, when running the above query in a hunt notebook, the HuntId will be available in the notebook context, therefore the source() plugin will be equivalent to the hunt_results() plugin.

When accessing another notebook cell, both the notebook_id and notebook_cell parameters must be explicitly specified:

SELECT * FROM source(notebook_id="N.123", notebook_cell="NC.1234")
Argument Type Description
client_id string The client id to extract
flow_id string A flow ID (client or server artifacts)
hunt_id string Retrieve sources from this hunt (combines all results from all clients)
artifact string The name of the artifact collection to fetch
source string An optional named source within the artifact
start_time Any Start return events from this date (for event sources)
end_time Any Stop end events reach this time (event sources).
notebook_id string The notebook to read from (should also include cell id)
notebook_cell_id string The notebook cell read from (should also include notebook id)
notebook_cell_version string The notebook cell version to read from (should also include notebook id and notebook cell)
notebook_cell_table int64 A notebook cell can have multiple tables.)
start_row int64 Start reading the result set from this row
count int64 Maximum number of rows to fetch (default unlimited)
orgs list of string Run the query over these orgs. If empty use the current org.

Required permissions: READ_RESULTS

Platforms: macOS, Linux, Windows

Source: vql/server/flows/results.go