机器学习PAI如果我想本地查某个表的某个分区的状态,
我看到pyodps可以这样。
instance = o.get_instance(‘2016042605520945g9k5pvyi2’)
instance.status
但是我如何知道某个表某个分区的instances id呢?
而且odps.list_instances() 得到的instances id 与dataworks运维里查的不一样。
odps.list_instances() 的结果是前面数字,后面字母。
dataworks运维里查的只有一串数字
要查询特定表特定分区的状态,你可以使用
odps.get_table_partition_instances(table_name, partition)
函数来获取该分区的所有实例,然后遍历每个实例并查询其状态。对于
odps.list_instances()
和 DataWorks 中显示的不同ID格式,我推测这可能是因为它们是从不同的源获取信息并使用不同的命名约定。