Hive static partitions issue <p>I have a csv file which have 600 records, 300 for male and female each.</p> <p>I have created a <code>Table_Temp</code> and fill all these records in that table. Then, I create <code>Table_Main</code> with <code>gender</code> as partition column.</p> <p>For Temp_Table query is:</p> <pre><code>Create table if not exists Temp_Table (id string, age int, gender string, city string, pin string) row format delimited fields terminated by ','; </code></pre> <p>Then I write the below query:</p> <pre><code>Insert into Table_Main partitioned (gender) select a,b,c,d,gender from Table)Temp </code></pre> <p><strong>Problem</strong>: I am getting a file in <code>/user/hive/warehouse/mydb.db/Table_Main/gender=Male/000000_0</code></p> <p>In this file, I am getting total 600 records. I am not sure whats happening but what I was expected is I should get 300 records in this file(only Male).</p> <p>Q:1. Where am I mistaken ?</p> <p>Q:2. Should I not get one more folder for all other values(which are not in static partition) ? If NOT, what will happen to those ?</p>