title: Specified partition columns do not match the partition columns of the table.Please use () as the partition columns
body: <p>here i'm trying to persist the data frame in to a partitioned hive table and getting this silly exception. I have looked in to it many times but not able to find the fault.</p>
  
  <blockquote>
    <p>org.apache.spark.sql.AnalysisException: Specified partition columns
    (timestamp value) do not match the partition columns of the table.
    Please use () as the partition columns.;</p>
  </blockquote>
  
  <p>Here is the script by which the  external table is  created with,</p>
  
  <pre><code>CREATE EXTERNAL TABLEIF NOT EXISTS events2 (
  action string
  ,device_os_ver string
  ,device_type string
  ,event_name string
  ,item_name string
  ,lat DOUBLE
  ,lon DOUBLE
  ,memberid BIGINT
  ,productupccd BIGINT
  ,tenantid BIGINT
  ) partitioned BY (timestamp_val DATE) 
  row format serde 'org.apache.hadoop.hive.ql.io.parquet.serde.ParquetHiveSerDe' 
  stored AS inputformat 'org.apache.hadoop.hive.ql.io.parquet.MapredParquetInputFormat' 
  outputformat 'org.apache.hadoop.hive.ql.io.parquet.MapredParquetOutputFormat' 
  location 'maprfs:///location/of/events2' 
  tblproperties ('serialization.null.format' = '');
  </code></pre>
  
  <p>Here is the result of describe formatted of  table "<strong>events2</strong>"</p>
  
  <pre><code>hive&gt; describe  formatted events2;
  OK
  # col_name              data_type               comment             
  
  action                  string                                      
  device_os_ver           string                                      
  device_type             string                                      
  event_name              string                                      
  item_name               string                                      
  lat                     double                                      
  lon                     double                                      
  memberid                bigint                                      
  productupccd            bigint                                      
  tenantid                bigint                                      
  
  # Partition Information      
  # col_name              data_type               comment             
  
  timestamp_val           date                                        
  
  # Detailed Table Information         
  Database:               default                                  
  CreateTime:             Wed Jan 11 16:58:55 IST 2017     
  LastAccessTime:         UNKNOWN                  
  Protect Mode:           None                     
  Retention:              0                        
  Location:               maprfs:/location/of/events2  
  Table Type:             EXTERNAL_TABLE           
  Table Parameters:        
      EXTERNAL                TRUE                
      serialization.null.format                       
      transient_lastDdlTime   1484134135          
  
  # Storage Information        
  SerDe Library:          org.apache.hadoop.hive.ql.io.parquet.serde.ParquetHiveSerDe  
  InputFormat:            org.apache.hadoop.hive.ql.io.parquet.MapredParquetInputFormat    
  OutputFormat:           org.apache.hadoop.hive.ql.io.parquet.MapredParquetOutputFormat   
  Compressed:             No                       
  Num Buckets:            -1                       
  Bucket Columns:         []                       
  Sort Columns:           []                       
  Storage Desc Params:         
      serialization.format    1                   
  Time taken: 0.078 seconds, Fetched: 42 row(s)
  </code></pre>
  
  <p>Here is the line of code where the data is partitioned and stored in to a table,</p>
  
  <pre><code>val tablepath = Map("path" -&gt; "maprfs:///location/of/events2")
  
  AppendDF.write.format("parquet").partitionBy("Timestamp_val").options(tablepath).mode(org.apache.spark.sql.SaveMode.Append).saveAsTable("events2")
  </code></pre>
  
  <p>While running the application, i'm getting the below </p>
  
  <blockquote>
    <p>Specified partition columns (timestamp_val) do not match the partition
    columns of the table.Please use () as the partition columns.</p>
  </blockquote>
  
  <p>I might be committing an obvious error, any help is much appreciated with an upvote :)</p>