<?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 Difficulty with date info in Hive query with workflow/coordinator in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Difficulty-with-date-info-in-Hive-query-with-workflow/m-p/32726#M8247</link>
    <description>&lt;P&gt;I'm having trouble getting date information into my workflow from a coordinator to schedule a Hive query periodically.&lt;STRONG&gt;&amp;nbsp; I'm using the GUI.&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;For Hive:&lt;BR /&gt;&lt;BR /&gt;My destination_table has a partition on the 'dt' column of type DATE.&lt;BR /&gt;&lt;BR /&gt;The query, which I've of course tested separately without the parameterization:&lt;BR /&gt;&lt;BR /&gt;insert into table destination_table&lt;BR /&gt;partition(dt='${dt}')&amp;nbsp; # note dt is string&lt;BR /&gt;select * from source&lt;BR /&gt;where day=${d}&amp;nbsp; # note day, month, year are integers&lt;BR /&gt;and month=${m}&lt;BR /&gt;and year=${y}&lt;BR /&gt;&lt;BR /&gt;In my worflow, I created four parameters:&lt;BR /&gt;&lt;BR /&gt;d=${DAY}&lt;BR /&gt;m=${MONTH}&lt;BR /&gt;y=${YEAR}&lt;BR /&gt;dt=${YEAR}-${MONTH}-${DAY}&lt;BR /&gt;&lt;BR /&gt;In my coordinator, under Workflow Parameters, I select DAY, MONTH and YEAR in the picklists, and then have respectively for each:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;${coord:formatTime(coord:nominalTime(), 'dd')}&lt;BR /&gt;${coord:formatTime(coord:nominalTime(), 'MM')}&lt;BR /&gt;${coord:formatTime(coord:nominalTime(), 'yyyy')}&lt;BR /&gt;&lt;BR /&gt;I think something's wrong with my workflow/coordinator parameters as the query runs without error, but doesn't result in any inserts.&lt;BR /&gt;&lt;BR /&gt;Thanks.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 16 Sep 2022 09:43:08 GMT</pubDate>
    <dc:creator>davidws</dc:creator>
    <dc:date>2022-09-16T09:43:08Z</dc:date>
    <item>
      <title>Difficulty with date info in Hive query with workflow/coordinator</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Difficulty-with-date-info-in-Hive-query-with-workflow/m-p/32726#M8247</link>
      <description>&lt;P&gt;I'm having trouble getting date information into my workflow from a coordinator to schedule a Hive query periodically.&lt;STRONG&gt;&amp;nbsp; I'm using the GUI.&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;For Hive:&lt;BR /&gt;&lt;BR /&gt;My destination_table has a partition on the 'dt' column of type DATE.&lt;BR /&gt;&lt;BR /&gt;The query, which I've of course tested separately without the parameterization:&lt;BR /&gt;&lt;BR /&gt;insert into table destination_table&lt;BR /&gt;partition(dt='${dt}')&amp;nbsp; # note dt is string&lt;BR /&gt;select * from source&lt;BR /&gt;where day=${d}&amp;nbsp; # note day, month, year are integers&lt;BR /&gt;and month=${m}&lt;BR /&gt;and year=${y}&lt;BR /&gt;&lt;BR /&gt;In my worflow, I created four parameters:&lt;BR /&gt;&lt;BR /&gt;d=${DAY}&lt;BR /&gt;m=${MONTH}&lt;BR /&gt;y=${YEAR}&lt;BR /&gt;dt=${YEAR}-${MONTH}-${DAY}&lt;BR /&gt;&lt;BR /&gt;In my coordinator, under Workflow Parameters, I select DAY, MONTH and YEAR in the picklists, and then have respectively for each:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;${coord:formatTime(coord:nominalTime(), 'dd')}&lt;BR /&gt;${coord:formatTime(coord:nominalTime(), 'MM')}&lt;BR /&gt;${coord:formatTime(coord:nominalTime(), 'yyyy')}&lt;BR /&gt;&lt;BR /&gt;I think something's wrong with my workflow/coordinator parameters as the query runs without error, but doesn't result in any inserts.&lt;BR /&gt;&lt;BR /&gt;Thanks.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 16 Sep 2022 09:43:08 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Difficulty-with-date-info-in-Hive-query-with-workflow/m-p/32726#M8247</guid>
      <dc:creator>davidws</dc:creator>
      <dc:date>2022-09-16T09:43:08Z</dc:date>
    </item>
    <item>
      <title>Re: Difficulty with date info in Hive query with workflow/coordinator</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Difficulty-with-date-info-in-Hive-query-with-workflow/m-p/32728#M8248</link>
      <description>&lt;P&gt;${coord:formatTime(coord:nominalTime(), 'yyyy-MM-dd')}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;the above thing works for me. Try it and let me know.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also you can check stdout and stderr logs in HUE. check and paste the same for further analysis.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 06 Oct 2015 21:18:15 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Difficulty-with-date-info-in-Hive-query-with-workflow/m-p/32728#M8248</guid>
      <dc:creator>naane</dc:creator>
      <dc:date>2015-10-06T21:18:15Z</dc:date>
    </item>
    <item>
      <title>Re: Difficulty with date info in Hive query with workflow/coordinator</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Difficulty-with-date-info-in-Hive-query-with-workflow/m-p/32730#M8249</link>
      <description>Thanks, but are you saying I should be using that statement in place of one of my assignments, and if so, then which one? I'm not quite clear on what you're saying I should change in what I'm doing. Thanks!</description>
      <pubDate>Tue, 06 Oct 2015 21:31:35 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Difficulty-with-date-info-in-Hive-query-with-workflow/m-p/32730#M8249</guid>
      <dc:creator>davidws</dc:creator>
      <dc:date>2015-10-06T21:31:35Z</dc:date>
    </item>
    <item>
      <title>Re: Difficulty with date info in Hive query with workflow/coordinator</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Difficulty-with-date-info-in-Hive-query-with-workflow/m-p/32731#M8250</link>
      <description>&lt;P&gt;&amp;nbsp;&amp;lt;action&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;workflow&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;app-path&amp;gt;${nameNode}${workflows}workflow.xml&amp;lt;/app-path&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;configuration&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;property&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;name&amp;gt;currdate&amp;lt;/name&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;value&amp;gt;${coord:formatTime(coord:nominalTime(), 'yyyy-MM-dd')}&amp;lt;/value&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/property&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/configuration&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/workflow&amp;gt;&lt;BR /&gt;&amp;lt;/action&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;is my action in the coordinator, which is starting the work flow and the workflow could read the currdate value just fine.&lt;BR /&gt;&lt;BR /&gt;may be if you can paste your coordinator I could guide you more.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 06 Oct 2015 21:39:42 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Difficulty-with-date-info-in-Hive-query-with-workflow/m-p/32731#M8250</guid>
      <dc:creator>naane</dc:creator>
      <dc:date>2015-10-06T21:39:42Z</dc:date>
    </item>
    <item>
      <title>Re: Difficulty with date info in Hive query with workflow/coordinator</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Difficulty-with-date-info-in-Hive-query-with-workflow/m-p/32793#M8251</link>
      <description>&lt;P&gt;I figured this out.&amp;nbsp;&amp;nbsp; Above code does work, however the database state was not as I expected so that's why it was failing.&amp;nbsp; Hopefully above could be useful to someone else doing the same thing, as I found almost nothing online concerning using Hue with Oozie.&lt;/P&gt;</description>
      <pubDate>Thu, 08 Oct 2015 17:38:38 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Difficulty-with-date-info-in-Hive-query-with-workflow/m-p/32793#M8251</guid>
      <dc:creator>davidws</dc:creator>
      <dc:date>2015-10-08T17:38:38Z</dc:date>
    </item>
  </channel>
</rss>

