首页 >Dataphin创建外部表报错:"You are not authorized to do this action. You should be authorized by RAM"

Dataphin创建外部表报错:"You are not authorized to do this action. You should be authorized by RAM"

问题描述

Dataphin代码任务创建外部表运行报错:"You are not authorized to do this action. You should be authorized by RAM"。

Process:com.aliyun.odps.OdpsException: ODPS-0130071:[1,1] Semantic analysis exception - external table checking failure, error message: java.lang.RuntimeException: {"RequestId":"F7BE8AF4-23AF-577C-9C9A-84C61D1FBCAC","HostId":"sts.aliyuncs.com","Code":"NoPermission","Message":"You are not authorized to do this action. You should be authorized by RAM.","Recommend":"https://error-center.aliyun.com/status/search?Keyword=NoPermission&source=PopGw"}
 at com.aliyun.odps.lot.cbo.converter.StsClient.assumeRoleWithServiceIdentityNoRetry(StsClient.java:123)
 at com.aliyun.odps.lot.cbo.converter.StsClient.assumeRoleWithServiceIdentity(StsClient.java:85)
 at com.aliyun.odps.compiler.ExternalTableChecker$LocationChecker.annotateLocationWithSTSToken(ExternalTableChecker.java:570)
 at com.aliyun.odps.compiler.ExternalTableChecker$LocationChecker.create(ExternalTableChecker.java:534)
 at com.aliyun.odps.compiler.ExternalTableChecker.checkLocation(ExternalTableChecker.java:485)
 at com.aliyun.odps.compiler.ExternalTableChecker.check(ExternalTableChecker.java:94)
 at com.aliyun.odps.compiler.TypeChecker.checkExternalTable(TypeChecker.java:1117)
 at com.aliyun.odps.compiler.TypeChecker.visit(TypeChecker.java:1033)
 at com.aliyun.odps.compiler.TypeChecker.visit(TypeChecker.java:178)
 at com.aliyun.odps.compiler.CreateTableStatement.accept(CreateTableStatement.java:268)
 at com.aliyun.odps.compiler.TreeScanner.scan(TreeScanner.java:1512)
 at com.aliyun.odps.compiler.TypeChecker.visit(TypeChecker.java:2113)
 at com.aliyun.odps.compiler.TypeChecker.visit(TypeChecker.java:178)
 at com.aliyun.odps.compiler.CompoundStatement.accept(CompoundStatement.java:41)
 at com.aliyun.odps.compiler.TreeScanner.scan(TreeScanner.java:1512)
 at com.aliyun.odps.compiler.TypeChecker.visit(TypeChecker.java:2113)
 at com.aliyun.odps.compiler.TypeChecker.visit(TypeChecker.java:178)
 at com.aliyun.odps.compiler.CompoundStatement.accept(CompoundStatement.java:41)
 at com.aliyun.odps.compiler.TreeScanner.scan(TreeScanner.java:1512)
 at com.aliyun.odps.compiler.TypeChecker.visit(TypeChecker.java:436)
 at com.aliyun.odps.compiler.TypeChecker.visit(TypeChecker.java:178)
 at com.aliyun.odps.compiler.Script.accept(Script.java:107)
 at com.aliyun.odps.compiler.TreeScanner.scan(TreeScanner.java:1512)
 at com.aliyun.odps.compiler.TypeChecker.check(TypeChecker.java:387)
 at com.aliyun.odps.compiler.OdpsQlCompiler.compile(OdpsQlCompiler.java:191)
 at com.aliyun.odps.compiler.OdpsQlCompiler.compile(OdpsQlCompiler.java:105)
 at com.aliyun.odps.sqltask.OdpsCompilerWrapper.parse(OdpsCompilerWrapper.java:196)
 at com.aliyun.odps.sqltask.OdpsCompilerWrapper.parse(OdpsCompilerWrapper.java:150)
 at com.aliyun.odps.sqltask.task.SqlTaskBase.doCompile(SqlTaskBase.java:108)
 at com.aliyun.odps.sqltask.task.SqlTaskBase.compile(SqlTaskBase.java:95)
 at com.aliyun.odps.sqltask.task.DDLTask.handleInternal(DDLTask.java:49)
 at com.aliyun.odps.sqltask.task.SqlTaskBase.handle(SqlTaskBase.java:68)
 at com.aliyun.odps.sqltask.SqlTaskDriver.execute(SqlTaskDriver.java:134)
 at com.aliyun.odps.sqltask.SqlTaskDriver.run(SqlTaskDriver.java:199)

问题原因

没有为RAM用户添加权限。

解决方案

给代码任务中的RAM用户添加相关权限即可。

适用于

  • Dataphin
阿里云首页 相关技术圈