MaxCompute创建oss外部表报错:
ODPS-0130071:[1,1] Semantic analysis exception - external table checking failure, error message: java.lang.RuntimeException: {"RequestId":"xxx","HostId":"sts.aliyuncs.com","Code":"EntityNotExist.Role","Message":"The role not exists:
根据报错看是在进行OSS下的STS授权出现异常。针对不同RAM进行授权的话,有两种解决方法:
1.在 RAM访问控制 界面创建该AliyunODPSDefaultRole角色,然后将AliyunODPSRolePolicy系统策略添加到该角色下,随后将该角色授权给不同的RAM用户。创建角色
参考文档。
2.直接在针对OSS等操作时进行SQL授权:with serdeproperties ( 'odps.properties.rolearn'='acs:ram::xxxxxx:role/aliyunodpsdefaultrole' 其中odps.properties.rolearn是指定RAM中AliyunODPSDefaultRole的ARN信息。详情
参考文档。