title: partition column in hive
body: <p>I have to partition the table in <code>hive</code> with a column which is also part of the table.</p>
  
  <p>For eg:</p>
  
  <p><strong>Table:</strong> employee</p>
  
  <p><strong>Columns:</strong> employeeId, employeeName, employeeSalary</p>
  
  <p>I have to <em>partition the table using employeeSalary</em>.
  So I write the following query:</p>
  
  <pre><code> CREATE TABLE employee (employeeId INT, employeeName STRING, employeeSalary INT) PARTITIONED BY (ds INT); 
  </code></pre>
  
  <p>I just used the name "ds" here as it did'nt allow me to put the same name <code>employeeSalary</code>.</p>
  
  <p>Is this right what I am doing? Also while inserting values into the table, I have to use a comma separated file. Now the file consists of row like:
  2019,John,2000</p>
  
  <p>as one row.
  If I have to partition using salary my first partition would be all people for salary 2000. So the query would be </p>
  
  <pre><code>LOAD DATA LOCAL INPATH './examples/files/kv2.txt' OVERWRITE INTO TABLE employee PARTITION (ds=2000);
  </code></pre>
  
  <p>Again after 100 entries with salary as 2000,  I have next 500 entries with salary as 4000.
  So I would again fire the query:</p>
  
  <pre><code>LOAD DATA LOCAL INPATH './examples/files/kv2.txt' OVERWRITE INTO TABLE employee PARTITION (ds=4000);
  </code></pre>
  
  <p>PLEASE LET ME KNOW IF I AM RIGHT...</p>