Class AddTriggers
This transformer adds in the neccessary table and expressions for performing triggering. That is, it will take some partition, for each combination of the values that these take, it will retain only the rows that occur after a row-level trigger evaluates to true. This does not do "whole user triggering", so rows from before the triggering event will not be included. This differs from Foray in that it partitions only on randomization unit, not also on Market and Flight.
Implements
Inherited Members
Namespace: Mangrove.MetricSetTransformers
Assembly: MetricSetTransformers.dll
Syntax
public class AddTriggers : LoggingTransformerBase, IMetricsPlanTransformer
Remarks
Timestamp column needed to sort the data is inferred using TryFindTimestampColumn(MetricsPlan, out ColumnReference).
The partition is done on the experiment unit only. The name of the experiment unit column is infered using Mangrove.MetricSetTransformers.Hacks.RollupDimensionsFinder.FindDimensions(Mangrove.MetricSetSyntaxTree.MetricsPlan). This is also not ideal, and should be resolved via metadata solution as discussed in 1. above.
Constructors
View SourceAddTriggers(Func<MetricsPlan, Func<String, Expression>>, IEnumerable<String>, ILogger)
Consume config settings required for triggering, and inject logic needed to implement triggering.
Declaration
public AddTriggers(Func<MetricsPlan, Func<string, Expression>> parser, IEnumerable<string> triggers, ILogger logger)
Parameters
Type | Name | Description |
---|---|---|
Func<MetricsPlan, Func<String, Expression>> | parser | Injected logic for parsing trigger condition. |
IEnumerable<String> | triggers | |
ILogger | logger |
Methods
View SourceTransformWithTracing(MetricsPlan, IMetricsPlanValidator)
This takes information about the triggering configuration stored in this transformer, and updates the given metric plan to include the logic needed to generate triggered results.
Declaration
public override MetricsPlan TransformWithTracing(MetricsPlan plan, IMetricsPlanValidator validator)
Parameters
Type | Name | Description |
---|---|---|
MetricsPlan | plan | The plan to add the triggering logic to. |
IMetricsPlanValidator | validator | Validator that will be run upon the created plan |
Returns
Type | Description |
---|---|
MetricsPlan |