0

Tried to use Hive to replace columns (deleting several columns), used command below, received error message (follows). Table is external, partitioned, ORC,

ALTER TABLE D.T REPLACE COLUMNS ( list of columns to keep ) ;

Error,

FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask. Replacing columns cannot drop columns for table sandbox6.alc_ont_oe_order_headers_all. SerDe may be incompatible

This question suggests that above should work
Alter hive table add or drop column

And this question also suggests same, but users report similar problem to mine, Drop column of hive table stored as orc

Am I doing something wrong, or do I just need to copy to a new table?
(Hive version is 2.5.3.0)

ChuckCottrill
  • 4,360
  • 2
  • 24
  • 42
  • Might it be related to permissions, your user has no privileges to perform that action? – Alg_D Jul 11 '17 at 21:26
  • The error message does not indicate permissions, but that might just be a poor choice of error message. How would I determine which user(s) have the requisite permissions? – ChuckCottrill Jul 11 '17 at 22:23
  • https://stackoverflow.com/questions/45045468/which-users-have-hive-table-ddl-schema-manipulation-permissions – ChuckCottrill Jul 11 '17 at 22:31
  • Also not sure if this is user permissions. Try some commands described here: https://cwiki.apache.org/confluence/display/Hive/SQL+Standard+Based+Hive+Authorization – Alg_D Jul 11 '17 at 22:54

0 Answers0