Home > database >  HIVE partition field Chinese annotation cannot be modified? What a great god help answer the followi
HIVE partition field Chinese annotation cannot be modified? What a great god help answer the followi

Time:09-25

SQL is as follows: the alter table tdm_tdm_web_preference_relt_d change statis_date statis_date bigint comment 'yyyymmdd';
Statis_date here for partition field, now want to modify this field Chinese annotation,
Modify the error is:
Error: Error while processing the statement: FAILED: Execution Error, the return code from 1 org.. Apache hadoop. Hive. Ql. Exec. DDLTask. Invalid column reference statis_dae (statis_date=08 s01, code=1)
Other fields in Chinese annotation can be modified, but this change, please help solve below, thanks

CodePudding user response:

Because partition field involves HDFS path problem, so can't like ordinary field directly modify comments, I recommend you to use modified hive metadata, MYSQL, for example:
The UPDATE PARTITION_KEYS ps
The join TBLS ts ON ps. TBL_ID=ts. TBL_ID
The join DBS ds on ts. DB_ID=ds. DB_ID
The set of ps. PKEY_COMMENT='comments'
WHERE ds. NAME='identification and ts. TBL_NAME=' table NAME and ps. PKEY_NAME='partition field NAME;

CodePudding user response:

Thank you very much!!!!!!
  • Related