<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Setting: Stateful Variables Initial Value in UpdateAttributes in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/Setting-Stateful-Variables-Initial-Value-in-UpdateAttributes/m-p/208798#M170755</link>
    <description>&lt;P&gt;I would like to use the the local State Management to keep track of the maximum value of a FlowFile attribute ever seen (the last data I fetched from an HTTP endpoint). It seems the UpdateAttributes "Store State" feature could be useful in keeping track of the maximum date I have processed thus far.&lt;/P&gt;&lt;P&gt;However, I can't even get the example in the UpdateAttributes documentation to work:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Dynamic Property&lt;UL&gt;&lt;LI&gt;key : theCount&lt;/LI&gt;&lt;LI&gt;value : ${getStateValue("theCount"):plus(1)}&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;I've set "Store State" to "Store state locally" but don't know how to set "Stateful Variables Initial Value".&lt;/P&gt;&lt;P&gt;When running the attribute "theCount" shows up as empty.&lt;/P&gt;&lt;P&gt;I tried changing the "value" to: ${getStateValue("theCount"):toNumber():plus(1)}&lt;/P&gt;&lt;P&gt;But that doesn't help. How is one supposed to use "Stateful Variables Initial Value"?&lt;/P&gt;</description>
    <pubDate>Wed, 14 Jun 2017 11:34:15 GMT</pubDate>
    <dc:creator>ericw</dc:creator>
    <dc:date>2017-06-14T11:34:15Z</dc:date>
  </channel>
</rss>

