admin管理员组文章数量:1122832
I'd like to use the view INFORMATION_SCHEMA.JOBS_BY_FOLDER
to get information about all the bigquery jobs in a folder that has no direct project but only contains folder that then contain projects.
It doesn't seem possible because it says :
The INFORMATION_SCHEMA.JOBS_BY_FOLDER view contains near real-time metadata about all jobs submitted in the parent folder of the current project, including the jobs in subfolders under it.
But I'd like to be able to get the job of a folder that doesn't have direct child... To my surprise, it doesn't seem to be possible! Am I missing something? This means that unless you filter a request to JOBS_BY_ORGANIZATION
, it is not possible to get the jobs of a projectless folder??
For example, let's say we have the folowing GCP organization :
.
└── folder_A
├── folder_B
│ └── project_X
└── folder_C
└── project_Y
If I try to query INFORMATION_SCHEMA.JOBS_BY_FOLDER
from project_X
, I will only get the jobs executed in the parent folder (ie folder_B
).
SELECT DISTINCT project_id from `project_X.region-europe-west4`.INFORMATION_SCHEMA.JOBS_BY_FOLDER`
Answer will be : | line | project_id | | ---- | ------------ | | 1 | project_X |
But I need:
line | project_id |
---|---|
1 | project_X |
2 | project_Y |
I'd like to use the view INFORMATION_SCHEMA.JOBS_BY_FOLDER
to get information about all the bigquery jobs in a folder that has no direct project but only contains folder that then contain projects.
It doesn't seem possible because it says :
The INFORMATION_SCHEMA.JOBS_BY_FOLDER view contains near real-time metadata about all jobs submitted in the parent folder of the current project, including the jobs in subfolders under it.
But I'd like to be able to get the job of a folder that doesn't have direct child... To my surprise, it doesn't seem to be possible! Am I missing something? This means that unless you filter a request to JOBS_BY_ORGANIZATION
, it is not possible to get the jobs of a projectless folder??
For example, let's say we have the folowing GCP organization :
.
└── folder_A
├── folder_B
│ └── project_X
└── folder_C
└── project_Y
If I try to query INFORMATION_SCHEMA.JOBS_BY_FOLDER
from project_X
, I will only get the jobs executed in the parent folder (ie folder_B
).
SELECT DISTINCT project_id from `project_X.region-europe-west4`.INFORMATION_SCHEMA.JOBS_BY_FOLDER`
Answer will be : | line | project_id | | ---- | ------------ | | 1 | project_X |
But I need:
line | project_id |
---|---|
1 | project_X |
2 | project_Y |
1 Answer
Reset to default 1It is not possible to query the job metadata of a folder that doesn't have a direct child which means projectless. If you want to get job metadata from multiple subfolders you can use INFORMATION_SCHEMA.JOBS_BY_FOLDER
and use UNION ALL
to list more than one project and a also query for jobs across your entire organization you can use JOBS_BY_ORGANIZATION
. Refer to this link1 and link2 for more insights. If you are looking for a feature related to this you can raise a feature request in the issue tracker by providing a detailed description issue.
本文标签:
版权声明:本文标题:finops - How to get the bigquery jobs metadata of a folder with no direct project with INFORMATION_SCHEMA.JOBS_BY_FOLDER - Stack 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1736281369a1926297.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论