Regarding the above advice, this query against the billing export does not return the SKU you mention:
SELECT sku.description
,count(*)
FROM logging-prod.billing_staging.gcp_billing_export_v1_01D159_A24B87_61C3AC
WHERE TIMESTAMP_TRUNC(_PARTITIONTIME, DAY) = TIMESTAMP(“2023-07-05”)
and service.description = ‘BigQuery’
group by 1
order by 1
Secondly, executing this query from the data access logs also returns nothing:
SELECT
–count()
distinct
REGEXP_EXTRACT( TO_JSON_STRING(protopayload_auditlog.servicedata_v1_bigquery.jobCompletedEvent.job.jobstatistics.reservationUsage), r’“key”:“name”,“value”:"([a-zA-Z0-9_-])“‘) AS name
,REGEXP_EXTRACT( TO_JSON_STRING(protopayload_auditlog.servicedata_v1_bigquery.jobCompletedEvent.job.jobstatistics.reservationUsage), r’“key”:“slotMs”,“value”:”([a-zA-Z0-9_-]*)"') AS slotMs
FROM prod.data_engineering_logging.cloudaudit_googleapis_com_data_access_20230705
where
protopayload_auditlog.servicedata_v1_bigquery.jobCompletedEvent.job.jobname.projectId like ‘%looker%’
Lastly, I was informed by Google to look at the below to see the spread of costs, but this is only across projects, or broken down by label, no reservation id, and not at a jobid level:
SELECT project_id
,sku.description
, count(*)
, sum(usage.amount) as usage_amount
FROM logging-prod.billing_staging.gcp_billing_export_v1_01D159_A24B87_61C3AC
where cast(usage_start_time as date) = ‘2023-07-04’
and sku.description = ‘Analysis Slots Attribution’
group by 1,2
order by 1,2
Now exploring the possibilities of INFORMATION_SCHEMA.JOBS, but a little reluctant because the reservation is only available on the project version of the view. Which would mean if you want a long-term view we need to take snapshots from every project, and why do that when yo have the data_access logs doing that work already???