liuxuedongcn opened a new issue #4496:
URL: https://github.com/apache/incubator-dolphinscheduler/issues/4496


   The hdfs path mapped when hive adds partitions is passed in by custom 
parameters:
   Sample statement: alter table test add if not exists partition(dt='${time}') 
location "/.../${time}/";
   Custom parameters:time in varchar $[yyyy-MM-dd]
   
   Problem Description:
   Quotation marks are added to the custom parameters in the Hive load 
partition SQL, which causes the partition path mapping error:
   before modification: location "/.../${time}/" Is parsed into location 
"/.../'2020-01-19'/"
   After modification : location "/.../${time}/" Is parsed into location 
"/.../2020-01-19/"
   After the modification, there are no quotation marks in the hdfs path, which 
meets the requirements of the partition of the hive table
   
   
--------------------------------------------------------------------------------------------------------------
   hive添加分区时所映射的hdfs路径由自定义参数传入 
   样例语句:alter table test add if not exists partition(dt='${time}') location 
"/.../${time}/";
   自定义参数:time in varchar $[yyyy-MM-dd]
   
   问题描述:
   Hive加载分区SQL里的自定义参数上加了引号,导致分区路径映射错误:
   修改前 location "/.../${time}/ 被解析成 location "/.../'2020-01-19'/
   修改后 location "/.../${time}/ 被解析成 location "/.../2020-01-19/
   修改后hdfs路径中不再有引号,符合hive表的分区的需求


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to