Pig 转换传递给 pig 脚本的时间戳并使用 replace 函数
Pig converting a time stamp passed to a pig script and using the replace function
REPLACE(ToDate('$current__ts', 'yyyy-MM-dd HH:mm:ss'),'-','') as new_DT,
我正在尝试在 YYYY-mm-dd 之间转换通过删除 - 传递的 current_ts 或时间戳,因此输出应为 yyyyMMdd HH:mm:ss
但我收到错误:
无法推断 org.apache.pig.builtin.REPLACE 的匹配函数,因为它们中有多个或 none 个匹配。请使用显式转换。
我也试过下面同样的错误
REPLACE((datetime)ToDate('$current__ts', 'yyyy-MM-dd HH:mm:ss'),'-','') as new_DT,
REPLACE(ToDate('$current__ts', 'yyyy-MM-dd HH:mm:ss'),'-','') as new_DT,
我正在尝试在 YYYY-mm-dd 之间转换通过删除 - 传递的 current_ts 或时间戳,因此输出应为 yyyyMMdd HH:mm:ss
但我收到错误: 无法推断 org.apache.pig.builtin.REPLACE 的匹配函数,因为它们中有多个或 none 个匹配。请使用显式转换。
我也试过下面同样的错误
REPLACE((datetime)ToDate('$current__ts', 'yyyy-MM-dd HH:mm:ss'),'-','') as new_DT,