title: How to merge orc files for external tables?
body: <p>I am trying to merge multiple small ORC files. Came across ALTER TABLE  CONCATENATE command but that only works for managed tables.</p>
  
  <p>Hive gave me the following error when I try to run it : </p>
  
  <blockquote>
    <p>FAILED: SemanticException
    org.apache.hadoop.hive.ql.parse.SemanticException: Concatenate/Merge
    can only be performed on managed tables</p>
  </blockquote>
  
  <p>Following are the table parameters : </p>
  
  <pre><code>Table Type:             EXTERNAL_TABLE
  Table Parameters:
      COLUMN_STATS_ACCURATE   true
      EXTERNAL                TRUE
      numFiles                535
      numRows                 27051810
      orc.compress            SNAPPY
      rawDataSize             20192634094
      totalSize               304928695
      transient_lastDdlTime   1512126635
  
  # Storage Information
  SerDe Library:          org.apache.hadoop.hive.ql.io.orc.OrcSerde
  InputFormat:            org.apache.hadoop.hive.ql.io.orc.OrcInputFormat
  OutputFormat:           org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat
  Compressed:             No
  Num Buckets:            -1
  Bucket Columns:         []
  Sort Columns:           []
  Storage Desc Params:
      serialization.format    1
  </code></pre>