<?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 Loading data into Hive Table from HDFS deletes the file from source directory(HDFS). in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/Loading-data-into-Hive-Table-from-HDFS-deletes-the-file-from/m-p/144309#M106891</link>
    <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;When we Load data into Hive table from HDFS, it deletes the file from source directory(HDFS) is there a way we can keep the file in the source directory and load the data into hive table as well.&lt;/P&gt;&lt;P&gt;I used the below query;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD DATA INPATH 'source_file_path' OVERWRITE INTO TABLE TABLENAME;&lt;/STRONG&gt;&lt;/P&gt;</description>
    <pubDate>Sat, 23 Jul 2016 20:03:44 GMT</pubDate>
    <dc:creator>ravikumashi</dc:creator>
    <dc:date>2016-07-23T20:03:44Z</dc:date>
    <item>
      <title>Loading data into Hive Table from HDFS deletes the file from source directory(HDFS).</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Loading-data-into-Hive-Table-from-HDFS-deletes-the-file-from/m-p/144309#M106891</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;When we Load data into Hive table from HDFS, it deletes the file from source directory(HDFS) is there a way we can keep the file in the source directory and load the data into hive table as well.&lt;/P&gt;&lt;P&gt;I used the below query;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD DATA INPATH 'source_file_path' OVERWRITE INTO TABLE TABLENAME;&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 23 Jul 2016 20:03:44 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Loading-data-into-Hive-Table-from-HDFS-deletes-the-file-from/m-p/144309#M106891</guid>
      <dc:creator>ravikumashi</dc:creator>
      <dc:date>2016-07-23T20:03:44Z</dc:date>
    </item>
    <item>
      <title>Re: Loading data into Hive Table from HDFS deletes the file from source directory(HDFS).</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Loading-data-into-Hive-Table-from-HDFS-deletes-the-file-from/m-p/144310#M106892</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/11479/ravikumashi.html" nodeid="11479"&gt;@Ravikumar Kumashi&lt;/A&gt;
&lt;/P&gt;&lt;P&gt;If you don't want to loss the source data copy while loading then the best way would be to create external table over that existing hdfs directory OR you can also make a copy of your source directory and create an external hive table that should point to new dir location.&lt;/P&gt;&lt;PRE&gt;hadoop fs -cp /path/old/hivetable /path/new/hivetable
create external table table_name ( id int, myfields string )
 location '/path/new/hivetable';&lt;/PRE&gt;</description>
      <pubDate>Sat, 23 Jul 2016 20:11:12 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Loading-data-into-Hive-Table-from-HDFS-deletes-the-file-from/m-p/144310#M106892</guid>
      <dc:creator>jyadav</dc:creator>
      <dc:date>2016-07-23T20:11:12Z</dc:date>
    </item>
    <item>
      <title>Re: Loading data into Hive Table from HDFS deletes the file from source directory(HDFS).</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Loading-data-into-Hive-Table-from-HDFS-deletes-the-file-from/m-p/144311#M106893</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/2528/jyadav.html" nodeid="2528"&gt;@Jitendra Yadav&lt;/A&gt;
&lt;/P&gt;&lt;P&gt;Thank you!!! that works for me.&lt;/P&gt;&lt;P&gt;I thought there is a way to keep the file in source directory and load the data into managed table as well and looks like there is no way for that.&lt;/P&gt;</description>
      <pubDate>Sat, 23 Jul 2016 20:16:48 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Loading-data-into-Hive-Table-from-HDFS-deletes-the-file-from/m-p/144311#M106893</guid>
      <dc:creator>ravikumashi</dc:creator>
      <dc:date>2016-07-23T20:16:48Z</dc:date>
    </item>
    <item>
      <title>Re: Loading data into Hive Table from HDFS deletes the file from source directory(HDFS).</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Loading-data-into-Hive-Table-from-HDFS-deletes-the-file-from/m-p/303703#M221664</link>
      <description>&lt;P&gt;In my case, source file gets removed, when I load a single file with '&lt;STRONG&gt;OVERWRITE&lt;/STRONG&gt;' clause.&lt;/P&gt;&lt;P&gt;file&lt;U&gt;&lt;STRONG&gt;s&lt;/STRONG&gt;&lt;/U&gt; stay when I load &lt;STRONG&gt;without 'OVERWRITE'&lt;/STRONG&gt; clause for a set of files with a pattern (say _*.txt)&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 09:54:20 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Loading-data-into-Hive-Table-from-HDFS-deletes-the-file-from/m-p/303703#M221664</guid>
      <dc:creator>aza</dc:creator>
      <dc:date>2020-09-30T09:54:20Z</dc:date>
    </item>
  </channel>
</rss>

