roboto.domain.actions.trigger_record
Module Contents
TriggerEvaluationCause
Bases: enum.Enum
The cause of a TriggerEvaluationRecord is the reason why the trigger was selected for evaluation.
Represents the specific event that caused a trigger to be evaluated for potential execution. Different causes may result in different trigger behavior or input data selection.
Attributes
TriggerEvaluationCause.DatasetMetadataUpdate
Trigger evaluation caused by changes to dataset metadata.
TriggerEvaluationCause.FileIngest
Trigger evaluation caused by files being ingested into a dataset.
TriggerEvaluationCause.FileMetadataUpdate
Trigger evaluation caused by file metadata or tag updates.
TriggerEvaluationCause.FileUpload
Trigger evaluation caused by new files being uploaded to a dataset.
TriggerEvaluationCause.RecurringSchedule
Trigger evaluation caused by a recurring schedule.
This cause is used internally by the Roboto system, to track the evaluation history of scheduled triggers. It should not be used when creating or updating triggers, and doing so will result in an error.
To create a trigger that invokes an action on a recurring schedule, use ScheduledTrigger.
TriggerEvaluationDataConstraint
Bases: pydantic.BaseModel
An optional filtering constraint applied to the data considered by a trigger evaluation.
Each trigger evaluation considers data of a particular data source ID and data source type. Typically (and to start, exclusively), this is a dataset ID (and type Dataset).
In the naive case before the introduction of this class, trigger evaluation for a dataset with 20k files would have to scan each file. This constraint allows us to filter the data to a subset during evaluation, e.g. only evaluate files from dataset ds_12345 with upload ID tx_123abc
Parameters
data AnyTriggerEvaluationOutcome
Bases: enum.Enum
The outcome of a TriggerEvaluationRecord is the result of the evaluation. A trigger can either invoke its associated action (one or many times) or be skipped. If skipped, a skip reason is provided.
TriggerEvaluationOutcomeReason
Bases: enum.Enum
Context for why a trigger evaluation has its TriggerEvaluationOutcome
Attributes
TriggerEvaluationOutcomeReason.AlreadyRun
This trigger has already run its associated action for this dataset and/or file.
TriggerEvaluationOutcomeReason.ConditionNotMet
The trigger’s condition is not met.
TriggerEvaluationOutcomeReason.NoMatchingFiles
In the case of a dataset trigger, there is no subset of files that, combined, match ALL of the trigger’s required inputs.
In the case of a file trigger, there are no files that match ANY of the trigger’s required inputs.
TriggerEvaluationOutcomeReason.TriggerDisabled
The trigger is disabled.
TriggerEvaluationRecord
Bases: pydantic.BaseModel
Record of a point-in-time evaluation of whether to invoke an action associated with a trigger for a data source.
Parameters
data AnyAttributes
TriggerEvaluationRecord.cause
TriggerEvaluationRecord.data_constraint
TriggerEvaluationRecord.data_source
TriggerEvaluationRecord.evaluation_end
TriggerEvaluationRecord.evaluation_start
TriggerEvaluationRecord.outcome
TriggerEvaluationRecord.outcome_reason
TriggerEvaluationRecord.status
TriggerEvaluationRecord.status_detail
TriggerEvaluationRecord.trigger_evaluation_id
TriggerEvaluationRecord.trigger_id
TriggerEvaluationStatus
Bases: enum.Enum
When a trigger is selected for evaluation, a trigger evaluation record is created with a status of Pending. The evaluation can either run to completion (regardless of its outcome), in which case the status is Evaluated, or hit an unexpected exception, in which case the status is Failed.
TriggerForEachPrimitive
Bases: roboto.compat.StrEnum
Defines the granularity at which a trigger executes.
Determines whether the trigger creates one invocation per dataset or one invocation per file within datasets that match the trigger conditions.
TriggerRecord
Bases: pydantic.BaseModel
A wire-transmissible representation of a trigger.
Contains all the configuration and metadata for a trigger, including the target action, input requirements, conditions, and execution settings.
This is the underlying data structure used by the Trigger domain class to store and transmit trigger information.
Parameters
data AnyAttributes
TriggerRecord.action
Reference to the action that should be invoked.
TriggerRecord.additional_inputs
Optional additional file patterns to include.
TriggerRecord.causes
List of events that can cause this trigger to be evaluated.
TriggerRecord.compute_requirement_overrides
compute_requirement_overrides roboto.Optional compute requirement overrides.
TriggerRecord.condition
Optional condition that must be met for trigger to fire.
TriggerRecord.container_parameter_overrides
container_parameter_overrides roboto.Optional container parameter overrides.
TriggerRecord.for_each
Granularity of trigger execution (Dataset or DatasetFile).
TriggerRecord.parameter_values
Parameter values to pass to the action.
TriggerRecord.required_inputs
File patterns that must be present for trigger to fire.
TriggerRecord.validate_additional_inputs()
Parameters
value Optional[list[str]]Return type
TriggerRecord.validate_required_inputs()
Parameters
value list[str]Return type