title: Data not transferred to table from file in HIVE
body: <p>So I am just starting out with HIVE,</p>
  
  <p>Here is what I do, </p>
  
  <p>-> Load the file into HDFS:    </p>
  
  <blockquote>
    <p>hadoop fs -put purchases.txt</p>
  </blockquote>
  
  <p>-> Create a table:</p>
  
  <pre><code>&gt; CREATE EXTERNAL TABLE p1(transaction STRING) STORED AS TEXTFILE
  &gt; LOCATION '/purchases.txt';
  </code></pre>
  
  <p>or</p>
  
  <blockquote>
    <p>CREATE TABLE p1(transaction STRING) STORED AS TEXTFILE LOCATION
    '/purchases.txt';</p>
  </blockquote>
  
  <p>-> Show the table:</p>
  
  <blockquote>
    <p>show tables;</p>
  </blockquote>
  
  <p>At this point it shows me the table p1 has been created.</p>
  
  <p>-> Viewing Contents </p>
  
  <p><code>select * from p1</code></p>
  
  <p>It just outputs</p>
  
  <pre><code>OK
  Time taken: 0.175 seconds
  </code></pre>
  
  <p>EDIT:</p>
  
  <p>The data is stored in this format:</p>
  
  <blockquote>
    <p>date '\t' time '\t' store '\t' item '\t' cost</p>
  </blockquote>
  
  <p>I would like to take the whole line as a single string and hence i've specified only one string column.</p>