<?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 livy sql interpreter can not find source file in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/livy-sql-interpreter-can-not-find-source-file/m-p/167195#M53869</link>
    <description>&lt;P&gt;I'm trying to run a SQL query using livy interpreter as below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;%livy.sql
LOAD DATA LOCAL INPATH '/tmp/abc.csv' INTO TABLE abc&lt;/PRE&gt;&lt;P&gt;it gives this error&lt;/P&gt;&lt;PRE&gt;org.apache.spark.sql.execution.QueryExecutionException: FAILED: SemanticException Line 1:23 Invalid path ''/tmp/abc.csv'': No files matching path file:/tmp/abc.csv&lt;/PRE&gt;&lt;P&gt;
 But when I run the same thing with %sql as below, it works fine.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;%sql
LOAD DATA LOCAL INPATH '/tmp/abc.csv' INTO TABLE abc&lt;/PRE&gt;&lt;P&gt;Any pointers on this behavior ?&lt;/P&gt;</description>
    <pubDate>Thu, 09 Feb 2017 09:22:06 GMT</pubDate>
    <dc:creator>yvora</dc:creator>
    <dc:date>2017-02-09T09:22:06Z</dc:date>
    <item>
      <title>livy sql interpreter can not find source file</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/livy-sql-interpreter-can-not-find-source-file/m-p/167195#M53869</link>
      <description>&lt;P&gt;I'm trying to run a SQL query using livy interpreter as below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;%livy.sql
LOAD DATA LOCAL INPATH '/tmp/abc.csv' INTO TABLE abc&lt;/PRE&gt;&lt;P&gt;it gives this error&lt;/P&gt;&lt;PRE&gt;org.apache.spark.sql.execution.QueryExecutionException: FAILED: SemanticException Line 1:23 Invalid path ''/tmp/abc.csv'': No files matching path file:/tmp/abc.csv&lt;/PRE&gt;&lt;P&gt;
 But when I run the same thing with %sql as below, it works fine.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;%sql
LOAD DATA LOCAL INPATH '/tmp/abc.csv' INTO TABLE abc&lt;/PRE&gt;&lt;P&gt;Any pointers on this behavior ?&lt;/P&gt;</description>
      <pubDate>Thu, 09 Feb 2017 09:22:06 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/livy-sql-interpreter-can-not-find-source-file/m-p/167195#M53869</guid>
      <dc:creator>yvora</dc:creator>
      <dc:date>2017-02-09T09:22:06Z</dc:date>
    </item>
    <item>
      <title>Re: livy sql interpreter can not find source file</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/livy-sql-interpreter-can-not-find-source-file/m-p/167196#M53870</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/551/yvora.html" nodeid="551"&gt;@yvora&lt;/A&gt; Its because %livy.sql interpreter runs in the yarn-cluster mode whereas %sql interpreter runs in the yarn-client mode. Hence %sql can find the local file on the client-machine whereas %livy.sql wont be able to find.&lt;/P&gt;&lt;P&gt;Try putting file in HDFS and use LOAD DATA INPATH rather than LOAD DATA LOCAL INPATH. It should work&lt;/P&gt;</description>
      <pubDate>Thu, 09 Feb 2017 09:24:17 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/livy-sql-interpreter-can-not-find-source-file/m-p/167196#M53870</guid>
      <dc:creator>kbadani</dc:creator>
      <dc:date>2017-02-09T09:24:17Z</dc:date>
    </item>
  </channel>
</rss>

