hive - 配置单元中的无效函数 regex_extract
问题描述
尝试在配置单元中执行查询:
select regex_extract(col,'regex',1) from tbl;
验证我使用的正则表达式是正确的。
错误:
FAILED: SemanticException [Error 10011]: Invalid function regex_extract
解决方案
Consider using regexp_extract
instead of regex_extract
in Hive.
Below is the right syntax for the regexp_extract:
regexp_extract(string subject, string pattern, int index)
Below is an example from hive docs
regexp_extract('foothebar', 'foo(.*?)(bar)', 2) returns 'bar.'
推荐阅读
- javascript - 如何在javascript中显示“未找到匹配项”
- docker - 当jenkins在docker容器中时如何在docker容器上运行构建
- ios - 如果我的数组中有数据,空的 tableview 标签会闪烁一秒钟
- vba - 无法在 PPT2016 (MAC OS) 中使用 VBA 删除超链接
- google-maps - cakephp3 中 google api 中的错误消息
- python - 如何在odoo 10中的向导树视图中计算/求和记录的总行数
- regex - 如何使用 Excel 中相邻列的特定文本填写表格列?
- node.js - 如何实现 DebugProgramRunner
- angular - rxjs 合并:您在预期流的位置提供了“未定义”
- vba - 用户表单,如何添加日期过滤器范围