title: How to add dynamic column with static value in hive
body: <p>I have structure of table like below:</p>
  
  <pre><code>0: jdbc:hive2://vw118287.ds.dev.accenture.com&gt; desc sample2;
  Getting log thread is interrupted, since query is done!
  +-------------+------------+----------+--+
  |  col_name   | data_type  | comment  |
  +-------------+------------+----------+--+
  | event_text  | string     |          |
  | load_date   | string     |          |
  +-------------+------------+----------+--+  
  </code></pre>
  
  <p>Now, I want to add a new column with constant value while inserting data into this table so I ran below query:</p>
  
  <pre><code>insert into table sample2 select event_text,'2019','Sample' as SampleColumn from ccs_service_optimization_9401.so_wireless_radius_summary ;
  </code></pre>
  
  <p>It throws below error:  </p>
  
  <pre><code>Caused by: org.apache.hadoop.hive.ql.parse.SemanticException: Line 1:18 Cannot insert into target table because column number/types are different 'sample2': Table insclause-0 has 2 columns, but query has 3 columns. 
  </code></pre>
  
  <p>I read in of the SO posts that this isn't possible in Hive but I believe there must be some or other way. Anyone has any idea about this ??</p>