blob: 14e3aaee72ee1ef9d7821531d5452cef844511bf [file] [log] [blame]
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"></meta><title>AttributeRollingWindow</title><link rel="stylesheet" href="../../../../../css/component-usage.css" type="text/css"></link></head><script type="text/javascript">window.onload = function(){if(self==top) { document.getElementById('nameHeader').style.display = "inherit"; } }</script><body><h1 id="nameHeader" style="display: none;">AttributeRollingWindow</h1><h2>Description: </h2><p>Track a Rolling Window based on evaluating an Expression Language expression on each FlowFile and add that value to the processor's state. Each FlowFile will be emitted with the count of FlowFiles and total aggregate value of values processed in the current time window.</p><h3>Tags: </h3><p>Attribute Expression Language, state, data science, rolling, window</p><h3>Properties: </h3><p>In the list below, the names of required properties appear in <strong>bold</strong>. Any other properties (not in bold) are considered optional. The table also indicates any default values, and whether a property supports the <a href="../../../../../html/expression-language-guide.html">NiFi Expression Language</a>.</p><table id="properties"><tr><th>Display Name</th><th>API Name</th><th>Default Value</th><th>Allowable Values</th><th>Description</th></tr><tr><td id="name"><strong>Value to track</strong></td><td>Value to track</td><td></td><td id="allowable-values"></td><td id="description">The expression on which to evaluate each FlowFile. The result of the expression will be added to the rolling window value.<br/><strong>Supports Expression Language: true (will be evaluated using flow file attributes and variable registry)</strong></td></tr><tr><td id="name"><strong>Time window</strong></td><td>Time window</td><td></td><td id="allowable-values"></td><td id="description">The time window on which to calculate the rolling window.</td></tr><tr><td id="name">Sub-window length</td><td>Sub-window length</td><td></td><td id="allowable-values"></td><td id="description">When set, values will be batched into sub-windows of the set length. This allows for much larger length total windows to be set but sacrifices some precision. If this is not set (or is 0) then each value is stored in state with the timestamp of when it was received. After the length of time stated in Time window elaspes the value will be removed. If this is set, values will be batched together every X amount of time (where X is the time period set for this property) and removed all at once.</td></tr></table><h3>Relationships: </h3><table id="relationships"><tr><th>Name</th><th>Description</th></tr><tr><td>set state fail</td><td>When state fails to save when processing a FlowFile, the FlowFile is routed here.</td></tr><tr><td>success</td><td>All FlowFiles are successfully processed are routed here</td></tr><tr><td>failure</td><td>When a FlowFile fails for a reason other than failing to set state it is routed here.</td></tr></table><h3>Reads Attributes: </h3>None specified.<h3>Writes Attributes: </h3><table id="writes-attributes"><tr><th>Name</th><th>Description</th></tr><tr><td>rolling_window_value</td><td>The rolling window value (sum of all the values stored).</td></tr><tr><td>rolling_window_count</td><td>The count of the number of FlowFiles seen in the rolling window.</td></tr><tr><td>rolling_window_mean</td><td>The mean of the FlowFiles seen in the rolling window.</td></tr></table><h3>State management: </h3><table id="stateful"><tr><th>Scope</th><th>Description</th></tr><tr><td>LOCAL</td><td>Store the values backing the rolling window. This includes storing the individual values and their time-stamps or the batches of values and their counts.</td></tr></table><h3>Restricted: </h3>This component is not restricted.<h3>Input requirement: </h3>This component requires an incoming relationship.<h3>System Resource Considerations:</h3>None specified.</body></html>