Dataphin中字段设置脱敏规则之后,数据查询报错“Ambiguous method for class com.alibaba.dt.dataphin.datasecurity.common.udf.hive.desensitization.simple.MobilePhone with (varchar(15)). Possible choices: _FUNC_(string) _FUNC_(string) ”
更新时间:
问题描述
Dataphin中字段设置脱敏规则之后,数据查询报错“Ambiguous method for class com.alibaba.dt.dataphin.datasecurity.common.udf.hive.desensitization.simple.MobilePhone with (varchar(15)). Possible choices: _FUNC_(string) _FUNC_(string) ”。完整的报错信息如下:
rocess:Task failed : org.apache.hive.service.cli.HiveSQLException: Error while compiling statement: FAILED: SemanticException [Error 10014]: Line 3:84 Wrong arguments 'TELPHONE': Ambiguous method for class com.alibaba.dt.dataphin.datasecurity.common.udf.hive.desensitization.simple.MobilePhone with (varchar(15)). Possible choices: _FUNC_(string) _FUNC_(string)
at org.apache.hive.jdbc.Utils.verifySuccess(Utils.java:241)
at org.apache.hive.jdbc.Utils.verifySuccessWithInfo(Utils.java:227)
at org.apache.hive.jdbc.HiveStatement.execute(HiveStatement.java:247)
at com.alibaba.dt.oneservice.sdk.task.BaseJdbcOsTask.runTask(BaseJdbcOsTask.java:118)
at com.alibaba.dt.oneservice.sdk.task.BaseOsTask.run(BaseOsTask.java:116)
at com.alibaba.dt.oneservice.sdk.job.OsJob.run(OsJob.java:219)
at com.alibaba.dt.oneservice.sdk.executor.BaseOsExecutor.lambda$run$0(BaseOsExecutor.java:48)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1152)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:627)
at java.lang.Thread.run(Thread.java:882)
Caused by: org.apache.hive.service.cli.HiveSQLException: Error while compiling statement: FAILED: SemanticException [Error 10014]: Line 3:84 Wrong arguments 'TELPHONE': Ambiguous method for class com.alibaba.dt.dataphin.datasecurity.common.udf.hive.desensitization.simple.MobilePhone with (varchar(15)). Possible choices: _FUNC_(string) _FUNC_(string)
at org.apache.hive.service.cli.operation.Operation.toSQLException(Operation.java:329)
at org.apache.hive.service.cli.operation.SQLOperation.prepare(SQLOperation.java:207)
at org.apache.hive.service.cli.operation.SQLOperation.runInternal(SQLOperation.java:290)
at org.apache.hive.service.cli.operation.Operation.run(Operation.java:260)
at org.apache.hive.service.cli.session.HiveSessionImpl.executeStatementInternal(HiveSessionImpl.java:504)
at org.apache.hive.service.cli.session.HiveSessionImpl.executeStatementAsync(HiveSessionImpl.java:490)
at org.apache.hive.service.cli.CLIService.executeStatementAsync(CLIService.java:295)
at org.apache.hive.service.cli.thrift.ThriftCLIService.ExecuteStatement(ThriftCLIService.java:507)
at org.apache.hive.service.rpc.thrift.TCLIService$Processor$ExecuteStatement.getResult(TCLIService.java:1437)
at org.apache.hive.service.rpc.thrift.TCLIService$Processor$ExecuteStatement.getResult(TCLIService.java:1422)
at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:39)
at org.apache.thrift.TBaseProcessor.process(TBaseProcessor.java:39)
at org.apache.hadoop.hive.thrift.HadoopThriftAuthBridge$Server$TUGIAssumingProcessor.process(HadoopThriftAuthBridge.java:605)
at org.apache.thrift.server.TThreadPoolServer$WorkerProcess.run(TThreadPoolServer.java:286)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
问题原因
资产安全策略没有更新导致。
解决方案
再"资产"-"安全"-"项目安全策略"中更新下"资产安全策略"问题解决:
适用于
- Dataphin
文档内容是否对您有帮助?