<?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 Re: Need help on constructing oozie wf in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Need-help-on-constructing-oozie-wf/m-p/113161#M42749</link>
    <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/12833/gobisubramani.html" nodeid="12833" target="_blank"&gt;@Gobi Subramani&lt;/A&gt;  I would suggest that you download and install HDP.  It can handle creating the data flow for you.  Here's an example of it &lt;A href="https://github.com/xmlking/nifi-examples/tree/master/collect-stream-logs" rel="nofollow noopener noreferrer" target="_blank"&gt;collecting logs&lt;/A&gt;. Instead of writing to an Event bus you could use putHDFS connector and it would write it to hdfs for you.  There isn't a lot of trickery to get the date/folder to work, you just need to ${now()} in place of the folder name to get the schema you are looking for.  If you look around there are lots of walk throughs and templates.  I have included a pic of a simple flow that would likely solve your issue.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="8299-screen-shot-2016-10-05-at-33423-pm.png" style="width: 2036px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/23183iF51B8FD885B39D66/image-size/medium?v=v2&amp;amp;px=400" role="button" title="8299-screen-shot-2016-10-05-at-33423-pm.png" alt="8299-screen-shot-2016-10-05-at-33423-pm.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 19 Aug 2019 11:10:55 GMT</pubDate>
    <dc:creator>matt_andruff</dc:creator>
    <dc:date>2019-08-19T11:10:55Z</dc:date>
    <item>
      <title>Need help on constructing oozie wf</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Need-help-on-constructing-oozie-wf/m-p/113159#M42747</link>
      <description>&lt;P&gt;Hi, &lt;/P&gt;&lt;P&gt;My requirement is, I need to run the job in every 30 min.&lt;/P&gt;&lt;P&gt;I need to create folder (yyyymmdd) in this format dynamically.&lt;/P&gt;&lt;P&gt;I need to copy the data from the table and put it in to that generated table.&lt;/P&gt;&lt;P&gt;How do I acheive that. I have referred many link, but no luck.&lt;/P&gt;&lt;P&gt;also, kindly clarify below terms &lt;/P&gt;&lt;P&gt;   &amp;lt;input-events&amp;gt; ,&amp;lt;output-events&amp;gt;, &amp;lt;datasets&amp;gt;,&amp;lt;uri-template&amp;gt;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Oct 2016 10:07:16 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Need-help-on-constructing-oozie-wf/m-p/113159#M42747</guid>
      <dc:creator>gobi_subramani</dc:creator>
      <dc:date>2016-10-05T10:07:16Z</dc:date>
    </item>
    <item>
      <title>Re: Need help on constructing oozie wf</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Need-help-on-constructing-oozie-wf/m-p/113160#M42748</link>
      <description>&lt;P&gt;You need a Oozie coordinator and a workflow with 2 actions (if I understand your conditions correctly). Set the coordinator frequency = "0/30 * * * *" to run the workflow on every full hour, and 30 minutes after every hour. In your coordinator set a property named for example DATE and set its value like below, see &lt;A href="http://stackoverflow.com/questions/24766592/pass-parameter-from-coordinator-xml-to-workflow-xml-oozie"&gt;here&lt;/A&gt; for details&lt;/P&gt;&lt;PRE&gt;${coord:formatTime(coord:nominalTime(), 'yyyy-MM-dd')}&lt;/PRE&gt;&lt;P&gt;In your workflow.xml, create 2 actions, the first will be an fs action to crate that directory, for example:&lt;/P&gt;&lt;PRE&gt;&amp;lt;mkdir path='${nameNode}/user/user1/data/${wf.conf("DATE")}' /&amp;gt;&lt;/PRE&gt;&lt;P&gt;And the second action will be a hive or hive2 action to "copy the data from the table and put it in to that generated table". [For another coordinator example see &lt;A href="https://www.tutorialspoint.com/apache_oozie/apache_oozie_coordinator.htm"&gt;this&lt;/A&gt;, and click "Previous page" links to find examples of the property file and a workflow with multiple actions, including hive actions.] &lt;/P&gt;&lt;P&gt;And finally, input-events and datasets is used if the condition for the coordinator to start is availability of a new dataset. uri-template is used to define a dataset, and output-events refers to the coordinator output. You can find more details here: &lt;A href="https://oozie.apache.org/docs/4.2.0/CoordinatorFunctionalSpec.html#a5._Dataset"&gt;datasets&lt;/A&gt;, &lt;A href="https://oozie.apache.org/docs/4.2.0/CoordinatorFunctionalSpec.html#a6.1._Concepts"&gt;coordinator concepts&lt;/A&gt;, and an example of a &lt;A href="https://community.hortonworks.com/articles/27497/oozie-coordinator-and-based-on-input-data-events.html"&gt;coordinator based on input-events&lt;/A&gt;. If you run your coordinator by time frequency you don't need that.&lt;/P&gt;</description>
      <pubDate>Wed, 05 Oct 2016 15:22:55 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Need-help-on-constructing-oozie-wf/m-p/113160#M42748</guid>
      <dc:creator>pminovic</dc:creator>
      <dc:date>2016-10-05T15:22:55Z</dc:date>
    </item>
    <item>
      <title>Re: Need help on constructing oozie wf</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Need-help-on-constructing-oozie-wf/m-p/113161#M42749</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/12833/gobisubramani.html" nodeid="12833" target="_blank"&gt;@Gobi Subramani&lt;/A&gt;  I would suggest that you download and install HDP.  It can handle creating the data flow for you.  Here's an example of it &lt;A href="https://github.com/xmlking/nifi-examples/tree/master/collect-stream-logs" rel="nofollow noopener noreferrer" target="_blank"&gt;collecting logs&lt;/A&gt;. Instead of writing to an Event bus you could use putHDFS connector and it would write it to hdfs for you.  There isn't a lot of trickery to get the date/folder to work, you just need to ${now()} in place of the folder name to get the schema you are looking for.  If you look around there are lots of walk throughs and templates.  I have included a pic of a simple flow that would likely solve your issue.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="8299-screen-shot-2016-10-05-at-33423-pm.png" style="width: 2036px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/23183iF51B8FD885B39D66/image-size/medium?v=v2&amp;amp;px=400" role="button" title="8299-screen-shot-2016-10-05-at-33423-pm.png" alt="8299-screen-shot-2016-10-05-at-33423-pm.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Aug 2019 11:10:55 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Need-help-on-constructing-oozie-wf/m-p/113161#M42749</guid>
      <dc:creator>matt_andruff</dc:creator>
      <dc:date>2019-08-19T11:10:55Z</dc:date>
    </item>
  </channel>
</rss>

