GoogleCloudPlatform / GoogleCloudPlatform/bigquery-utils

Add report showing projects using on demand slots

Open
#367 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Jupyter Notebook
Stars
1.3k
Forks
337
PR merge metrics
No merged PRs in 30d

Description

Recently encountered an issue with a Customer where they needed to verify if on demand slots were being used for any projects. They wrote this query against INFORMATION_SCHEMA. Is this something we would consider adding to the system tables dashboard?

select project_id,sum(total_bytes_billed) as bytes_billed,sum(total_slot_ms) as slot_ms from `region-us`.INFORMATION_SCHEMA.JOBS_BY_ORGANIZATION where creation_time > TIMESTAMP_SUB(CURRENT_TIMESTAMP(),INTERVAL 24 HOUR) AND job_id not in ( select parent_job_id from `region-us`.INFORMATION_SCHEMA.JOBS_BY_ORGANIZATION where creation_time > TIMESTAMP_SUB(CURRENT_TIMESTAMP(),INTERVAL 24 HOUR) AND parent_job_id is not null ) AND reservation_id is null and parent_job_id is null AND error_result is null AND job_type="QUERY" AND state="DONE" AND priority="INTERACTIVE" and total_bytes_billed >0 group by project_id order by bytes_billed DESC

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.