<?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 Set a variable into context and retreive later using cron in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Set-a-variable-into-context-and-retreive-later-using-cron/m-p/207182#M79015</link>
    <description>&lt;P&gt;Hello!&lt;/P&gt;&lt;P&gt;I have a flow that the first box is scheduled with cron. The cron is configured to execute every hour.&lt;/P&gt;&lt;P&gt;At the start of the flow, I have to read a variable that I have set at the end of the last execution.&lt;/P&gt;&lt;P&gt;How could I set a variable a variable at the end of the flow and how to read it at the start of the next execution?&lt;/P&gt;&lt;P&gt;I have searched a lot and I saw something about context variable and counters. Maybe is it a way? &lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Robert&lt;/P&gt;</description>
    <pubDate>Fri, 01 Jun 2018 02:21:31 GMT</pubDate>
    <dc:creator>robert_cavalcan</dc:creator>
    <dc:date>2018-06-01T02:21:31Z</dc:date>
    <item>
      <title>Set a variable into context and retreive later using cron</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Set-a-variable-into-context-and-retreive-later-using-cron/m-p/207182#M79015</link>
      <description>&lt;P&gt;Hello!&lt;/P&gt;&lt;P&gt;I have a flow that the first box is scheduled with cron. The cron is configured to execute every hour.&lt;/P&gt;&lt;P&gt;At the start of the flow, I have to read a variable that I have set at the end of the last execution.&lt;/P&gt;&lt;P&gt;How could I set a variable a variable at the end of the flow and how to read it at the start of the next execution?&lt;/P&gt;&lt;P&gt;I have searched a lot and I saw something about context variable and counters. Maybe is it a way? &lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Robert&lt;/P&gt;</description>
      <pubDate>Fri, 01 Jun 2018 02:21:31 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Set-a-variable-into-context-and-retreive-later-using-cron/m-p/207182#M79015</guid>
      <dc:creator>robert_cavalcan</dc:creator>
      <dc:date>2018-06-01T02:21:31Z</dc:date>
    </item>
    <item>
      <title>Re: Set a variable into context and retreive later using cron</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Set-a-variable-into-context-and-retreive-later-using-cron/m-p/207183#M79016</link>
      <description>&lt;A rel="user" href="https://community.cloudera.com/users/81235/robertcavalcante.html" nodeid="81235"&gt;@robert cavalcante&lt;/A&gt;&lt;P&gt;You can use &lt;STRONG&gt;Put/Fetch Distributed Map Cache processors&lt;/STRONG&gt; to set some value for the variable(attribute) at the end of flow then retrieve the already set value at starting of the flow.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;Flow:&lt;/U&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;1.Trigger the flow with cron&lt;BR /&gt;2.FetchDistributedMapCache Processor //to fetch the value that got set up last execution&lt;BR /&gt;3.do some processing &lt;BR /&gt;4.PutDistributedMapCache Processor //set the new value for the variable&lt;/PRE&gt;&lt;P&gt;Refer to &lt;A href="https://community.hortonworks.com/questions/188338/attributes-lost-after-running-selecthiveql.html?childToView=189663#answer-189663" target="_blank"&gt;this&lt;/A&gt; link to configure/Usage of Put/Fetch DistributedMapCache processors.&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;P&gt;If the Answer addressed your question, &lt;STRONG&gt;Click on Accept button below to accept the answer&lt;/STRONG&gt;, That would be great help to Community users to find solution quickly for these kind of issues.&lt;/P&gt;</description>
      <pubDate>Fri, 01 Jun 2018 08:35:58 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Set-a-variable-into-context-and-retreive-later-using-cron/m-p/207183#M79016</guid>
      <dc:creator>Shu_ashu</dc:creator>
      <dc:date>2018-06-01T08:35:58Z</dc:date>
    </item>
    <item>
      <title>Re: Set a variable into context and retreive later using cron</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Set-a-variable-into-context-and-retreive-later-using-cron/m-p/207184#M79017</link>
      <description>&lt;P&gt;Thanks, this solution is was I needed!&lt;/P&gt;</description>
      <pubDate>Mon, 04 Jun 2018 23:15:37 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Set-a-variable-into-context-and-retreive-later-using-cron/m-p/207184#M79017</guid>
      <dc:creator>robert_cavalcan</dc:creator>
      <dc:date>2018-06-04T23:15:37Z</dc:date>
    </item>
  </channel>
</rss>

