通过odpscmd客户端执行
暂时无法在飞书文档外展示此内容
配置conf文件夹中的odps_config.ini文件
然后运行bin目录下的odpscmd.bat出现下面的场景说明运行成功,已经连接到MaxCompute。
设置权限的思路:
如需要生产环境的所有表的Describe, Select权限,可以操作如下:
1、创建一个角色,比如tableviewer
create role tableviewer;
2、授权所有表的Describe, Select权限给角色tableviewer,
grant Describe, Select on table * to role tableviewer;
“*”代表的是具体的表名。grant 方法一次只能设置一张表。可以在MaxCompute中操作,通过执行show tables;命令来获取项目下的所有表名称
3、将角色tableviewer 授权给对应子账号
grant tableviewer to aliyun$alice@aliyun.com;
“aliyun$alice@aliyun.com”这个可以通过list users命令进行查看需要授权的用户。
判断是否授权成功可以参考文档:https://help.aliyun.com/zh/maxcompute/user-guide/query-permissions-by-using-maxcompute-sql