大数据上云第一课:(1)MaxCompute授权和外表操作躲坑指南(16)

安装Information Schema的权限包方式有如下两种:(1)在MaxCompute命令行工具(odpscmd)中执行如下命令 。

odps@myproject1>install package information_schema.systables;

(2)在DataWorks中的数据开发 > 临时查询中执行如下语句 。

install package information_schema.systables;

2、给子账号授权

grant read on package information_schema.systables to role worker;

3、查询元数据信息

select * from information_schema.tasks_history limit 20;

TASKS_HISTORY字段列信息如下:

4、通过 TASKS_HISTORY 计算SQL费用SQL任务按量计费:您每执行一条SQL作业 , MaxCompute将根据该作业的输入数据及该SQL的复杂度进行计费 。 该费用在SQL执行完成后产生 , 并在第二天做一次性的计费结算 。

推荐阅读