<?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: how to build HDFS path to load data from ?!?!?! in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/how-to-build-HDFS-path-to-load-data-from/m-p/12422#M1798</link>
    <description>&lt;P&gt;sorry for bothering &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Issue has been solved, the error was the result of "work in concurrency" of many people in the same folder. Thereby the message "file not found" did make sense....&lt;/P&gt;</description>
    <pubDate>Fri, 16 May 2014 18:34:40 GMT</pubDate>
    <dc:creator>geko</dc:creator>
    <dc:date>2014-05-16T18:34:40Z</dc:date>
    <item>
      <title>how to build HDFS path to load data from ?!?!?!</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/how-to-build-HDFS-path-to-load-data-from/m-p/12412#M1797</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a 'simple' usecase (I thought it is simple &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt; ).&lt;/P&gt;&lt;P&gt;I want to call a hive script with a parameter in format YYYY-MM-DD. Inside the script I want to load data from HDFS path /a/b/c/d_${parameter}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How to build the path dynamically to be able to place it into LOAD DATA INPATH '...'&amp;nbsp;OVERWRITE INTO TABLE data_staging;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Even setting the path to a variable (hardcoded) and place it as INPATH doesn't work ?!?!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;set p="/a/b/c/d_2013-07-08/data.tsv";&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;LOAD DATA INPATH "${hiveconf:p}" OVERWRITE INTO TABLE data_staging;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;=&amp;gt;&amp;nbsp;&lt;SPAN&gt;Error while compiling statement: FAILED: ParseException line 1:19 mismatched input '/' expecting INTO near '""' in load statement&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;If I remove the quotes from the parameter placeholder I receive an error, too. File not found, even if it does exist in HDFS, for sure, I checked it many times...&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;set p="/a/b/c/d_2013-07-08/data.tsv";&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;LOAD DATA INPATH ${hiveconf:p} OVERWRITE INTO TABLE data_staging;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;=&amp;gt; Error while compiling statement: FAILED: SemanticException Line 1:17 Invalid path '"/a/b/c/d_2013-07-08/data.tsv"': No files matching path hdfs://nameservice1/a/b/c/d_2013-07-08/data.tsv&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;How can I build the path variable inside the hive script to be able to load data files from that path ?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I want to pass the day as parameter and read files from HDFS path /a/b/c/d_YYYY-MM-DD/&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;thanks in advance...&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;PS: using latest CDH5.0.1&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 16 Sep 2022 08:59:05 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/how-to-build-HDFS-path-to-load-data-from/m-p/12412#M1797</guid>
      <dc:creator>geko</dc:creator>
      <dc:date>2022-09-16T08:59:05Z</dc:date>
    </item>
    <item>
      <title>Re: how to build HDFS path to load data from ?!?!?!</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/how-to-build-HDFS-path-to-load-data-from/m-p/12422#M1798</link>
      <description>&lt;P&gt;sorry for bothering &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Issue has been solved, the error was the result of "work in concurrency" of many people in the same folder. Thereby the message "file not found" did make sense....&lt;/P&gt;</description>
      <pubDate>Fri, 16 May 2014 18:34:40 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/how-to-build-HDFS-path-to-load-data-from/m-p/12422#M1798</guid>
      <dc:creator>geko</dc:creator>
      <dc:date>2014-05-16T18:34:40Z</dc:date>
    </item>
  </channel>
</rss>

