Anatomy of a tagger definition
A tagger definition's YAML file is made up of distinct sections. You are encouraged to reference this guide as you create and edit your first tagger definition.
1. Gating
An optional section that allows you to control if and when a normfill invocation skips an ingested robolog. The gating mechanism is based on a GQL search query you specify within the tagger definition, and it uses the same syntax as that used in Model-Prime's search interface.
Tip: The gating section is optional, but recommended. An enabled tagger whose latest, tested tagger version omits the gating section will run on all newly ingested robologs.
You could use the gating section to specify that only robologs exceeding a certain size should be processed by the normfill invocation. Or, you could specify that only robologs with a matching regular expression applied to their file path are processed by the invocation. The possibilities are endless.
Note: A tagger definition's gating section is ignored during backfill invocations. This is because backfill invocations run on whichever robologs you choose while creating the backfill invocation request. Test invocations do use the gating section, however, as it provides you with a way to validate the gating logic against the robologs you select for testing.
2. Variables
A section that specifies the tagger's inputs.
Variable name
An identifier used to reference the variable in later sections.
Source channel
The robolog channel from which the variable's value is sourced.
Access path
The data path accessing a value or complex type within a message.
Tip: The path should be specific, ending on a value and not a sub-component of the data structure whenever possible. This reduces the amount of compute time required to run the tagger.
Rolling window
An optional feature that allows you to specify a rolling window of data to be used in the calculation of the variable's value. The rolling window is defined by the following parameters:
Direction
The direction of the rolling window—either "look_ahead" or "look_back".
Unit
The unit of time to be used—either "seconds" or "frames".
Size
The number of units to be included in the rolling window.
Import dependencies
An optional Python code block you may use to import built-in modules and define functions you intend to use in the rolling function's calculation.
Rolling function
The window function used to calculate the variable's value.
3. Predicates
A section containing rules—specified as expressions evaluating to a boolean value—that must all be true during the event.
Predicate name
An identifier used to reference the predicate in later sections.
Import
An optional Python code block that you may use to import built-in modules and to define functions that you intend to use in the predicate's Calculate section.
Calculate
An optional Python code block you may use to calculate intermediate values referred to in the Evaluate section.
Evaluate
An expression that must evaluate to a boolean value. The expression may reference any variables defined in the tagger definition's Variables section, as well as any intermediate values calculated in the predicate's Calculate section.
4. Outputs
A section specifying the metadata value(s) created for each identified event.
Output Name
A name that uniquely identifies the output.
Field alias
The metadata field's alias for which a new value is created.
Note: While our web UI allows you to select the field via its alias from a dropdown menu, the field's ID is used in the YAML definition.
Type
Specifies whether the metadata created is static—using a value you provide within the definition—or dynamic—using a function applied to the data corresponding to each event instance.