From 4dd2e9214918cff36dfec83a61dfe7d82fac8695 Mon Sep 17 00:00:00 2001 From: Vasilii Surov Date: Mon, 16 Oct 2023 15:14:39 -0400 Subject: [PATCH] Adjust on-demand price to $6.25 --- audit_log/billing_recommendations_per_query.sql | 2 +- audit_log/billing_recommendations_per_query_general.sql | 2 +- audit_log/general_job_information.sql | 2 +- audit_log/general_job_information_general.sql | 2 +- audit_log/longest_running_queries.sql | 2 +- audit_log/longest_running_queries_general.sql | 2 +- audit_log/query_counts.sql | 2 +- audit_log/query_counts_general.sql | 2 +- audit_log/query_job_information.sql | 2 +- audit_log/query_job_information_general.sql | 2 +- audit_log/top_billed_labels.sql | 2 +- audit_log/top_billed_labels_general.sql | 2 +- audit_log/top_billed_queries.sql | 2 +- audit_log/top_billed_queries_deduplicated.sql | 2 +- audit_log/top_billed_queries_deduplicated_general.sql | 2 +- audit_log/top_billed_queries_general.sql | 2 +- audit_log/top_complex_queries.sql | 2 +- audit_log/top_complex_queries_general.sql | 2 +- audit_log/top_cost_user_by_region_and_project.sql | 2 +- audit_log/top_cost_users.sql | 2 +- audit_log/top_cost_users_general.sql | 2 +- audit_log/top_costly_queries.sql | 2 +- audit_log/top_costly_queries_general.sql | 2 +- information_schema/billing_recommendation_per_query.sql | 2 +- information_schema/general_job_information.sql | 2 +- information_schema/longest_running_queries.sql | 2 +- information_schema/looker_job_information.sql | 2 +- information_schema/query_counts.sql | 2 +- information_schema/query_job_information.sql | 2 +- information_schema/top_billed_labels.sql | 2 +- information_schema/top_billed_queries.sql | 2 +- information_schema/top_billed_queries_deduplicated.sql | 2 +- information_schema/top_complex_queries.sql | 2 +- information_schema/top_cost_users.sql | 2 +- information_schema/top_costly_queries.sql | 2 +- 35 files changed, 35 insertions(+), 35 deletions(-) diff --git a/audit_log/billing_recommendations_per_query.sql b/audit_log/billing_recommendations_per_query.sql index 1b4cc99..8fd08d8 100644 --- a/audit_log/billing_recommendations_per_query.sql +++ b/audit_log/billing_recommendations_per_query.sql @@ -11,7 +11,7 @@ WITH src AS ( protopayload_auditlog.servicedata_v1_bigquery.jobCompletedEvent.job.jobStatistics.startTime, MILLISECOND)) AS approximateSlotCount, ROUND(SAFE_DIVIDE(COALESCE(protopayload_auditlog.servicedata_v1_bigquery.jobCompletedEvent.job.jobStatistics.totalBilledBytes, 0), - POW(1024, 4)) * 5, 2) AS onDemandCost, + POW(1024, 4)) * 6.25, 2) AS onDemandCost, CASE protopayload_auditlog.servicedata_v1_bigquery.jobCompletedEvent.eventName WHEN 'query_job_completed' THEN 'QUERY' WHEN 'load_job_completed' THEN 'LOAD' diff --git a/audit_log/billing_recommendations_per_query_general.sql b/audit_log/billing_recommendations_per_query_general.sql index e406381..1a5eff4 100644 --- a/audit_log/billing_recommendations_per_query_general.sql +++ b/audit_log/billing_recommendations_per_query_general.sql @@ -11,7 +11,7 @@ WITH src AS ( protopayload_auditlog.servicedata_v1_bigquery.jobCompletedEvent.job.jobStatistics.startTime, MILLISECOND)) AS approximateSlotCount, ROUND(SAFE_DIVIDE(COALESCE(protopayload_auditlog.servicedata_v1_bigquery.jobCompletedEvent.job.jobStatistics.totalBilledBytes, 0), - POW(1024, 4)) * 5, 2) AS onDemandCost, + POW(1024, 4)) * 6.25, 2) AS onDemandCost, CASE protopayload_auditlog.servicedata_v1_bigquery.jobCompletedEvent.eventName WHEN 'query_job_completed' THEN 'QUERY' WHEN 'load_job_completed' THEN 'LOAD' diff --git a/audit_log/general_job_information.sql b/audit_log/general_job_information.sql index 8acea55..5e8bc81 100644 --- a/audit_log/general_job_information.sql +++ b/audit_log/general_job_information.sql @@ -23,7 +23,7 @@ WITH src AS ( protopayload_auditlog.servicedata_v1_bigquery.jobCompletedEvent.job.jobName.projectId AS billingProjectId, protopayload_auditlog.servicedata_v1_bigquery.jobCompletedEvent.job.jobStatistics.startTime, protopayload_auditlog.servicedata_v1_bigquery.jobCompletedEvent.job.jobStatistics.endTime, - ROUND(SAFE_DIVIDE(COALESCE(protopayload_auditlog.servicedata_v1_bigquery.jobCompletedEvent.job.jobStatistics.totalBilledBytes, 0), POW(1024, 4)) * 5, 2) AS cost, + ROUND(SAFE_DIVIDE(COALESCE(protopayload_auditlog.servicedata_v1_bigquery.jobCompletedEvent.job.jobStatistics.totalBilledBytes, 0), POW(1024, 4)) * 6.25, 2) AS cost, COALESCE(protopayload_auditlog.servicedata_v1_bigquery.jobCompletedEvent.job.jobStatistics.totalBilledBytes, 0) AS totalBilledBytes, protopayload_auditlog.servicedata_v1_bigquery.jobCompletedEvent.job.jobStatistics.totalSlotMs, TIMESTAMP_DIFF(protopayload_auditlog.servicedata_v1_bigquery.jobCompletedEvent.job.jobStatistics.endTime, diff --git a/audit_log/general_job_information_general.sql b/audit_log/general_job_information_general.sql index ff18ae4..b6ce0f9 100644 --- a/audit_log/general_job_information_general.sql +++ b/audit_log/general_job_information_general.sql @@ -23,7 +23,7 @@ WITH src AS ( protopayload_auditlog.servicedata_v1_bigquery.jobCompletedEvent.job.jobName.projectId AS billingProjectId, protopayload_auditlog.servicedata_v1_bigquery.jobCompletedEvent.job.jobStatistics.startTime, protopayload_auditlog.servicedata_v1_bigquery.jobCompletedEvent.job.jobStatistics.endTime, - ROUND(SAFE_DIVIDE(COALESCE(protopayload_auditlog.servicedata_v1_bigquery.jobCompletedEvent.job.jobStatistics.totalBilledBytes, 0), POW(1024, 4)) * 5, 2) AS cost, + ROUND(SAFE_DIVIDE(COALESCE(protopayload_auditlog.servicedata_v1_bigquery.jobCompletedEvent.job.jobStatistics.totalBilledBytes, 0), POW(1024, 4)) * 6.25, 2) AS cost, COALESCE(protopayload_auditlog.servicedata_v1_bigquery.jobCompletedEvent.job.jobStatistics.totalBilledBytes, 0) AS totalBilledBytes, protopayload_auditlog.servicedata_v1_bigquery.jobCompletedEvent.job.jobStatistics.totalSlotMs, TIMESTAMP_DIFF(protopayload_auditlog.servicedata_v1_bigquery.jobCompletedEvent.job.jobStatistics.endTime, diff --git a/audit_log/longest_running_queries.sql b/audit_log/longest_running_queries.sql index 3f8ede7..779489b 100644 --- a/audit_log/longest_running_queries.sql +++ b/audit_log/longest_running_queries.sql @@ -63,7 +63,7 @@ SELECT runtimeToBytesBilledRatio, startTime, endTime, - ROUND(SAFE_DIVIDE(totalBytesBilled, POW(1024, 4)) * 5, 2) AS onDemandCost, + ROUND(SAFE_DIVIDE(totalBytesBilled, POW(1024, 4)) * 6.25, 2) AS onDemandCost, ROUND(COALESCE(totalBytesBilled, 0), 2) AS totalBytesBilled, ROUND(COALESCE(totalBytesBilled, 0) / POW(1024, 2), 2) AS totalMegabytesBilled, ROUND(COALESCE(totalBytesBilled, 0) / POW(1024, 3), 2) AS totalGigabytesBilled, diff --git a/audit_log/longest_running_queries_general.sql b/audit_log/longest_running_queries_general.sql index 8604b88..9c32a38 100644 --- a/audit_log/longest_running_queries_general.sql +++ b/audit_log/longest_running_queries_general.sql @@ -62,7 +62,7 @@ SELECT runtimeToBytesBilledRatio, startTime, endTime, - ROUND(SAFE_DIVIDE(totalBytesBilled, POW(1024, 4)) * 5, 2) AS onDemandCost, + ROUND(SAFE_DIVIDE(totalBytesBilled, POW(1024, 4)) * 6.25, 2) AS onDemandCost, ROUND(COALESCE(totalBytesBilled, 0), 2) AS totalBytesBilled, ROUND(COALESCE(totalBytesBilled, 0) / POW(1024, 2), 2) AS totalMegabytesBilled, ROUND(COALESCE(totalBytesBilled, 0) / POW(1024, 3), 2) AS totalGigabytesBilled, diff --git a/audit_log/query_counts.sql b/audit_log/query_counts.sql index b8796a1..8b1272a 100644 --- a/audit_log/query_counts.sql +++ b/audit_log/query_counts.sql @@ -72,7 +72,7 @@ WITH SELECT query, queryCount, - ROUND(SAFE_DIVIDE(totalBytesBilled, POW(1024, 3)) * 5, 2) AS onDemandCost, + ROUND(SAFE_DIVIDE(totalBytesBilled, POW(1024, 3)) * 6.25, 2) AS onDemandCost, ROUND(COALESCE(totalBytesBilled, 0), 2) AS totalBytesBilled, ROUND(COALESCE(totalBytesBilled, 0) / POW(1024, 2), 2) AS totalMegabytesBilled, ROUND(COALESCE(totalBytesBilled, 0) / POW(1024, 3), 2) AS totalGigabytesBilled, diff --git a/audit_log/query_counts_general.sql b/audit_log/query_counts_general.sql index fed4af9..6d6f0db 100644 --- a/audit_log/query_counts_general.sql +++ b/audit_log/query_counts_general.sql @@ -71,7 +71,7 @@ WITH SELECT query, queryCount, - ROUND(SAFE_DIVIDE(totalBytesBilled, POW(1024, 4)) * 5, 2) AS onDemandCost, + ROUND(SAFE_DIVIDE(totalBytesBilled, POW(1024, 4)) * 6.25, 2) AS onDemandCost, ROUND(COALESCE(totalBytesBilled, 0), 2) AS totalBytesBilled, ROUND(COALESCE(totalBytesBilled, 0) / POW(1024, 2), 2) AS totalMegabytesBilled, ROUND(COALESCE(totalBytesBilled, 0) / POW(1024, 3), 2) AS totalGigabytesBilled, diff --git a/audit_log/query_job_information.sql b/audit_log/query_job_information.sql index 094d696..ba56ef2 100644 --- a/audit_log/query_job_information.sql +++ b/audit_log/query_job_information.sql @@ -14,7 +14,7 @@ WITH src AS ( protopayload_auditlog.servicedata_v1_bigquery.jobCompletedEvent.job.jobStatistics.referencedTables as referencedTables, protopayload_auditlog.servicedata_v1_bigquery.jobCompletedEvent.job.labels as labels, ROUND(SAFE_DIVIDE(COALESCE(protopayload_auditlog.servicedata_v1_bigquery.jobCompletedEvent.job.jobStatistics.totalBilledBytes, - 0), POW(1024, 4)) * 5, 2) AS onDemandCost, + 0), POW(1024, 4)) * 6.25, 2) AS onDemandCost, ROUND(COALESCE(protopayload_auditlog.servicedata_v1_bigquery.jobCompletedEvent.job.jobStatistics.totalBilledBytes, 0), 2) AS totalBytesBilled, ROUND(COALESCE(protopayload_auditlog.servicedata_v1_bigquery.jobCompletedEvent.job.jobStatistics.totalBilledBytes, diff --git a/audit_log/query_job_information_general.sql b/audit_log/query_job_information_general.sql index 094d696..ba56ef2 100644 --- a/audit_log/query_job_information_general.sql +++ b/audit_log/query_job_information_general.sql @@ -14,7 +14,7 @@ WITH src AS ( protopayload_auditlog.servicedata_v1_bigquery.jobCompletedEvent.job.jobStatistics.referencedTables as referencedTables, protopayload_auditlog.servicedata_v1_bigquery.jobCompletedEvent.job.labels as labels, ROUND(SAFE_DIVIDE(COALESCE(protopayload_auditlog.servicedata_v1_bigquery.jobCompletedEvent.job.jobStatistics.totalBilledBytes, - 0), POW(1024, 4)) * 5, 2) AS onDemandCost, + 0), POW(1024, 4)) * 6.25, 2) AS onDemandCost, ROUND(COALESCE(protopayload_auditlog.servicedata_v1_bigquery.jobCompletedEvent.job.jobStatistics.totalBilledBytes, 0), 2) AS totalBytesBilled, ROUND(COALESCE(protopayload_auditlog.servicedata_v1_bigquery.jobCompletedEvent.job.jobStatistics.totalBilledBytes, diff --git a/audit_log/top_billed_labels.sql b/audit_log/top_billed_labels.sql index 4bfcaea..2e348cd 100644 --- a/audit_log/top_billed_labels.sql +++ b/audit_log/top_billed_labels.sql @@ -43,7 +43,7 @@ labels AS ( ROUND(SUM(COALESCE(totalBilledBytes, 0)) / POW(1024, 4), 2) AS totalTerabytesBilled, ROUND(SAFE_DIVIDE(SUM(COALESCE(totalBilledBytes, 0)), - POW(1024, 4)) * 5, 2) AS onDemandCost, + POW(1024, 4)) * 6.25, 2) AS onDemandCost, labels.key AS labelKey, labels.value AS labelValue FROM jobsDeduplicated diff --git a/audit_log/top_billed_labels_general.sql b/audit_log/top_billed_labels_general.sql index cc45e16..7e76c24 100644 --- a/audit_log/top_billed_labels_general.sql +++ b/audit_log/top_billed_labels_general.sql @@ -42,7 +42,7 @@ labels AS ( ROUND(SUM(COALESCE(totalBilledBytes, 0)) / POW(1024, 4), 2) AS totalTerabytesBilled, ROUND(SAFE_DIVIDE(SUM(COALESCE(totalBilledBytes, 0)), - POW(1024, 4)) * 5, 2) AS onDemandCost, + POW(1024, 4)) * 6.25, 2) AS onDemandCost, labels.key AS labelKey, labels.value AS labelValue FROM jobsDeduplicated diff --git a/audit_log/top_billed_queries.sql b/audit_log/top_billed_queries.sql index 2014cc4..da6cfde 100644 --- a/audit_log/top_billed_queries.sql +++ b/audit_log/top_billed_queries.sql @@ -12,7 +12,7 @@ SELECT protopayload_auditlog.servicedata_v1_bigquery.jobCompletedEvent.job.jobStatistics.startTime, protopayload_auditlog.servicedata_v1_bigquery.jobCompletedEvent.job.jobStatistics.endTime, ROUND(SAFE_DIVIDE(COALESCE(protopayload_auditlog.servicedata_v1_bigquery.jobCompletedEvent.job.jobStatistics.totalBilledBytes, - 0), POW(1024, 3)) * 5, 2) AS onDemandCost, + 0), POW(1024, 3)) * 6.25, 2) AS onDemandCost, ROUND(COALESCE(protopayload_auditlog.servicedata_v1_bigquery.jobCompletedEvent.job.jobStatistics.totalBilledBytes, 0), 2) AS totalBytesBilled, ROUND(COALESCE(protopayload_auditlog.servicedata_v1_bigquery.jobCompletedEvent.job.jobStatistics.totalBilledBytes, diff --git a/audit_log/top_billed_queries_deduplicated.sql b/audit_log/top_billed_queries_deduplicated.sql index b1dad6c..9ffb767 100644 --- a/audit_log/top_billed_queries_deduplicated.sql +++ b/audit_log/top_billed_queries_deduplicated.sql @@ -13,7 +13,7 @@ WITH src AS ( protopayload_auditlog.servicedata_v1_bigquery.jobCompletedEvent.job.jobStatistics.startTime, protopayload_auditlog.servicedata_v1_bigquery.jobCompletedEvent.job.jobStatistics.endTime, ROUND(SAFE_DIVIDE(COALESCE(protopayload_auditlog.servicedata_v1_bigquery.jobCompletedEvent.job.jobStatistics.totalBilledBytes, - 0), POW(1024, 4)) * 5, 2) AS onDemandCost, + 0), POW(1024, 4)) * 6.25, 2) AS onDemandCost, ROUND(COALESCE(protopayload_auditlog.servicedata_v1_bigquery.jobCompletedEvent.job.jobStatistics.totalBilledBytes, 0), 2) AS totalBytesBilled, ROUND(COALESCE(protopayload_auditlog.servicedata_v1_bigquery.jobCompletedEvent.job.jobStatistics.totalBilledBytes, diff --git a/audit_log/top_billed_queries_deduplicated_general.sql b/audit_log/top_billed_queries_deduplicated_general.sql index dfcf38b..17e21aa 100644 --- a/audit_log/top_billed_queries_deduplicated_general.sql +++ b/audit_log/top_billed_queries_deduplicated_general.sql @@ -13,7 +13,7 @@ WITH src AS ( protopayload_auditlog.servicedata_v1_bigquery.jobCompletedEvent.job.jobStatistics.startTime, protopayload_auditlog.servicedata_v1_bigquery.jobCompletedEvent.job.jobStatistics.endTime, ROUND(SAFE_DIVIDE(COALESCE(protopayload_auditlog.servicedata_v1_bigquery.jobCompletedEvent.job.jobStatistics.totalBilledBytes, - 0), POW(1024, 4)) * 5, 2) AS onDemandCost, + 0), POW(1024, 4)) * 6.25, 2) AS onDemandCost, ROUND(COALESCE(protopayload_auditlog.servicedata_v1_bigquery.jobCompletedEvent.job.jobStatistics.totalBilledBytes, 0), 2) AS totalBytesBilled, ROUND(COALESCE(protopayload_auditlog.servicedata_v1_bigquery.jobCompletedEvent.job.jobStatistics.totalBilledBytes, diff --git a/audit_log/top_billed_queries_general.sql b/audit_log/top_billed_queries_general.sql index 2576ded..45dce16 100644 --- a/audit_log/top_billed_queries_general.sql +++ b/audit_log/top_billed_queries_general.sql @@ -12,7 +12,7 @@ SELECT protopayload_auditlog.servicedata_v1_bigquery.jobCompletedEvent.job.jobStatistics.startTime, protopayload_auditlog.servicedata_v1_bigquery.jobCompletedEvent.job.jobStatistics.endTime, ROUND(SAFE_DIVIDE(COALESCE(protopayload_auditlog.servicedata_v1_bigquery.jobCompletedEvent.job.jobStatistics.totalBilledBytes, - 0), POW(1024, 4)) * 5, 2) AS onDemandCost, + 0), POW(1024, 4)) * 6.25, 2) AS onDemandCost, ROUND(COALESCE(protopayload_auditlog.servicedata_v1_bigquery.jobCompletedEvent.job.jobStatistics.totalBilledBytes, 0), 2) AS totalBytesBilled, ROUND(COALESCE(protopayload_auditlog.servicedata_v1_bigquery.jobCompletedEvent.job.jobStatistics.totalBilledBytes, diff --git a/audit_log/top_complex_queries.sql b/audit_log/top_complex_queries.sql index 4d51df4..f5023df 100644 --- a/audit_log/top_complex_queries.sql +++ b/audit_log/top_complex_queries.sql @@ -13,7 +13,7 @@ WITH src AS ( protopayload_auditlog.servicedata_v1_bigquery.jobCompletedEvent.job.jobStatistics.startTime, protopayload_auditlog.servicedata_v1_bigquery.jobCompletedEvent.job.jobStatistics.endTime, protopayload_auditlog.servicedata_v1_bigquery.jobCompletedEvent.job.jobStatistics.totalBilledBytes, - ROUND(SAFE_DIVIDE(protopayload_auditlog.servicedata_v1_bigquery.jobCompletedEvent.job.jobStatistics.totalBilledBytes, POW(1024, 4)) * 5, 2) AS onDemandCost, + ROUND(SAFE_DIVIDE(protopayload_auditlog.servicedata_v1_bigquery.jobCompletedEvent.job.jobStatistics.totalBilledBytes, POW(1024, 4)) * 6.25, 2) AS onDemandCost, protopayload_auditlog.servicedata_v1_bigquery.jobCompletedEvent.job.jobStatistics.totalSlotMs, TIMESTAMP_DIFF(protopayload_auditlog.servicedata_v1_bigquery.jobCompletedEvent.job.jobStatistics.endTime, protopayload_auditlog.servicedata_v1_bigquery.jobCompletedEvent.job.jobStatistics.startTime, diff --git a/audit_log/top_complex_queries_general.sql b/audit_log/top_complex_queries_general.sql index 4d51df4..f5023df 100644 --- a/audit_log/top_complex_queries_general.sql +++ b/audit_log/top_complex_queries_general.sql @@ -13,7 +13,7 @@ WITH src AS ( protopayload_auditlog.servicedata_v1_bigquery.jobCompletedEvent.job.jobStatistics.startTime, protopayload_auditlog.servicedata_v1_bigquery.jobCompletedEvent.job.jobStatistics.endTime, protopayload_auditlog.servicedata_v1_bigquery.jobCompletedEvent.job.jobStatistics.totalBilledBytes, - ROUND(SAFE_DIVIDE(protopayload_auditlog.servicedata_v1_bigquery.jobCompletedEvent.job.jobStatistics.totalBilledBytes, POW(1024, 4)) * 5, 2) AS onDemandCost, + ROUND(SAFE_DIVIDE(protopayload_auditlog.servicedata_v1_bigquery.jobCompletedEvent.job.jobStatistics.totalBilledBytes, POW(1024, 4)) * 6.25, 2) AS onDemandCost, protopayload_auditlog.servicedata_v1_bigquery.jobCompletedEvent.job.jobStatistics.totalSlotMs, TIMESTAMP_DIFF(protopayload_auditlog.servicedata_v1_bigquery.jobCompletedEvent.job.jobStatistics.endTime, protopayload_auditlog.servicedata_v1_bigquery.jobCompletedEvent.job.jobStatistics.startTime, diff --git a/audit_log/top_cost_user_by_region_and_project.sql b/audit_log/top_cost_user_by_region_and_project.sql index b398390..2cfdd0b 100644 --- a/audit_log/top_cost_user_by_region_and_project.sql +++ b/audit_log/top_cost_user_by_region_and_project.sql @@ -11,7 +11,7 @@ WITH src AS ( protopayload_auditlog.servicedata_v1_bigquery.jobCompletedEvent.job.jobStatistics.startTime, protopayload_auditlog.servicedata_v1_bigquery.jobCompletedEvent.job.jobStatistics.endTime, protopayload_auditlog.servicedata_v1_bigquery.jobCompletedEvent.job.jobStatistics.totalBilledBytes, - ROUND(SAFE_DIVIDE(protopayload_auditlog.servicedata_v1_bigquery.jobCompletedEvent.job.jobStatistics.totalBilledBytes, POW(1024, 3)) * 5, 2) AS onDemandCost, + ROUND(SAFE_DIVIDE(protopayload_auditlog.servicedata_v1_bigquery.jobCompletedEvent.job.jobStatistics.totalBilledBytes, POW(1024, 3)) * 6.25, 2) AS onDemandCost, protopayload_auditlog.servicedata_v1_bigquery.jobCompletedEvent.job.jobStatistics.totalSlotMs, TIMESTAMP_DIFF(protopayload_auditlog.servicedata_v1_bigquery.jobCompletedEvent.job.jobStatistics.endTime, protopayload_auditlog.servicedata_v1_bigquery.jobCompletedEvent.job.jobStatistics.startTime, diff --git a/audit_log/top_cost_users.sql b/audit_log/top_cost_users.sql index 10393e2..8679ae3 100644 --- a/audit_log/top_cost_users.sql +++ b/audit_log/top_cost_users.sql @@ -11,7 +11,7 @@ WITH src AS ( protopayload_auditlog.servicedata_v1_bigquery.jobCompletedEvent.job.jobStatistics.startTime, protopayload_auditlog.servicedata_v1_bigquery.jobCompletedEvent.job.jobStatistics.endTime, protopayload_auditlog.servicedata_v1_bigquery.jobCompletedEvent.job.jobStatistics.totalBilledBytes, - ROUND(SAFE_DIVIDE(protopayload_auditlog.servicedata_v1_bigquery.jobCompletedEvent.job.jobStatistics.totalBilledBytes, POW(1024, 4)) * 5, 2) AS onDemandCost, + ROUND(SAFE_DIVIDE(protopayload_auditlog.servicedata_v1_bigquery.jobCompletedEvent.job.jobStatistics.totalBilledBytes, POW(1024, 4)) * 6.25, 2) AS onDemandCost, protopayload_auditlog.servicedata_v1_bigquery.jobCompletedEvent.job.jobStatistics.totalSlotMs, TIMESTAMP_DIFF(protopayload_auditlog.servicedata_v1_bigquery.jobCompletedEvent.job.jobStatistics.endTime, protopayload_auditlog.servicedata_v1_bigquery.jobCompletedEvent.job.jobStatistics.startTime, diff --git a/audit_log/top_cost_users_general.sql b/audit_log/top_cost_users_general.sql index 7c6858a..6f0590c 100644 --- a/audit_log/top_cost_users_general.sql +++ b/audit_log/top_cost_users_general.sql @@ -11,7 +11,7 @@ WITH src AS ( protopayload_auditlog.servicedata_v1_bigquery.jobCompletedEvent.job.jobStatistics.startTime, protopayload_auditlog.servicedata_v1_bigquery.jobCompletedEvent.job.jobStatistics.endTime, protopayload_auditlog.servicedata_v1_bigquery.jobCompletedEvent.job.jobStatistics.totalBilledBytes, - ROUND(SAFE_DIVIDE(protopayload_auditlog.servicedata_v1_bigquery.jobCompletedEvent.job.jobStatistics.totalBilledBytes, POW(1024, 4)) * 5, 2) AS onDemandCost, + ROUND(SAFE_DIVIDE(protopayload_auditlog.servicedata_v1_bigquery.jobCompletedEvent.job.jobStatistics.totalBilledBytes, POW(1024, 4)) * 6.25, 2) AS onDemandCost, protopayload_auditlog.servicedata_v1_bigquery.jobCompletedEvent.job.jobStatistics.totalSlotMs, TIMESTAMP_DIFF(protopayload_auditlog.servicedata_v1_bigquery.jobCompletedEvent.job.jobStatistics.endTime, protopayload_auditlog.servicedata_v1_bigquery.jobCompletedEvent.job.jobStatistics.startTime, diff --git a/audit_log/top_costly_queries.sql b/audit_log/top_costly_queries.sql index 1eaa6d6..878abff 100644 --- a/audit_log/top_costly_queries.sql +++ b/audit_log/top_costly_queries.sql @@ -56,7 +56,7 @@ SELECT ROUND(COALESCE(totalBytesBilled, 0) / POW(1024, 2), 2) AS totalMegabytesBilled, ROUND(COALESCE(totalBytesBilled, 0) / POW(1024, 3), 2) AS totalGigabytesBilled, ROUND(COALESCE(totalBytesBilled, 0) / POW(1024, 4), 2) AS totalTerabytesBilled, - ROUND(SAFE_DIVIDE(totalBytesBilled, POW(1024, 4)) * 5, 2) AS onDemandCost + ROUND(SAFE_DIVIDE(totalBytesBilled, POW(1024, 4)) * 6.25, 2) AS onDemandCost FROM hashedQueries ORDER BY diff --git a/audit_log/top_costly_queries_general.sql b/audit_log/top_costly_queries_general.sql index c1a1840..2f1dba4 100644 --- a/audit_log/top_costly_queries_general.sql +++ b/audit_log/top_costly_queries_general.sql @@ -55,7 +55,7 @@ SELECT ROUND(COALESCE(totalBytesBilled, 0) / POW(1024, 2), 2) AS totalMegabytesBilled, ROUND(COALESCE(totalBytesBilled, 0) / POW(1024, 3), 2) AS totalGigabytesBilled, ROUND(COALESCE(totalBytesBilled, 0) / POW(1024, 4), 2) AS totalTerabytesBilled, - ROUND(SAFE_DIVIDE(totalBytesBilled, POW(1024, 4)) * 5, 2) AS onDemandCost + ROUND(SAFE_DIVIDE(totalBytesBilled, POW(1024, 4)) * 6.25, 2) AS onDemandCost FROM hashedQueries ORDER BY diff --git a/information_schema/billing_recommendation_per_query.sql b/information_schema/billing_recommendation_per_query.sql index 5d9d8f8..4861e38 100644 --- a/information_schema/billing_recommendation_per_query.sql +++ b/information_schema/billing_recommendation_per_query.sql @@ -38,7 +38,7 @@ WITH SELECT *, ROUND(SAFE_DIVIDE(totalBytesBilled, - POW(1024, 4)) * 5, 2) AS legacyOnDemandCost, + POW(1024, 4)) * 6.25, 2) AS legacyOnDemandCost, ROUND(SAFE_DIVIDE(totalBytesBilled, POW(1024, 4)) * 6.25, 2) AS onDemandCost, (approximateSlotCount/(60*60)) * 0.04 AS standardEditionCost, diff --git a/information_schema/general_job_information.sql b/information_schema/general_job_information.sql index 0582d57..9b3838e 100644 --- a/information_schema/general_job_information.sql +++ b/information_schema/general_job_information.sql @@ -19,7 +19,7 @@ BEGIN ROUND(COALESCE(total_bytes_billed, 0) / POW(1024, 4), 2) AS totalTerabytesBilled, total_slot_ms AS totalSlotMs, ROUND(SAFE_DIVIDE(total_bytes_billed, - POW(1024, 4)) * 5, 2) AS onDemandCost, + POW(1024, 4)) * 6.25, 2) AS onDemandCost, ROUND(SAFE_DIVIDE(total_slot_ms, TIMESTAMP_DIFF(end_time, start_time, MILLISECOND)), 2) AS approximateSlotCount, ROW_NUMBER() OVER (PARTITION BY job_id ORDER BY end_time DESC) AS _rnk diff --git a/information_schema/longest_running_queries.sql b/information_schema/longest_running_queries.sql index d6a1813..a074dc4 100644 --- a/information_schema/longest_running_queries.sql +++ b/information_schema/longest_running_queries.sql @@ -23,7 +23,7 @@ BEGIN ROUND(COALESCE(total_bytes_billed, 0) / POW(1024, 4), 2) AS totalTerabytesBilled, ROUND(SAFE_DIVIDE(total_bytes_billed, - POW(1024, 4)) * 5, 2) AS cost, + POW(1024, 4)) * 6.25, 2) AS cost, ROUND(SAFE_DIVIDE(total_slot_ms, TIMESTAMP_DIFF(end_time, start_time, MILLISECOND)), 2) AS approximateSlotCount, ROW_NUMBER() OVER(PARTITION BY job_id ORDER BY end_time DESC) AS _rnk, diff --git a/information_schema/looker_job_information.sql b/information_schema/looker_job_information.sql index 2753c1b..c0490a3 100644 --- a/information_schema/looker_job_information.sql +++ b/information_schema/looker_job_information.sql @@ -16,7 +16,7 @@ BEGIN total_bytes_billed AS totalBytesBilled, total_slot_ms AS totalSlotMs, ROUND(SAFE_DIVIDE(total_bytes_billed, - POW(1024, 4)) * 5, 2) AS cost, + POW(1024, 4)) * 6.25, 2) AS cost, ROUND(SAFE_DIVIDE(total_slot_ms, TIMESTAMP_DIFF(end_time, start_time, MILLISECOND)), 2) AS approximateSlotCount, ROW_NUMBER() OVER (PARTITION BY job_id ORDER BY end_time DESC) AS _rnk diff --git a/information_schema/query_counts.sql b/information_schema/query_counts.sql index 6416c7b..c7c0a9c 100644 --- a/information_schema/query_counts.sql +++ b/information_schema/query_counts.sql @@ -68,7 +68,7 @@ WITH SELECT query, queryCount, - ROUND(SAFE_DIVIDE(totalBytesBilled, POW(1024, 4)) * 5, 2) AS onDemandCost, + ROUND(SAFE_DIVIDE(totalBytesBilled, POW(1024, 4)) * 6.25, 2) AS onDemandCost, ROUND(COALESCE(totalBytesBilled, 0), 2) AS totalBytesBilled, ROUND(COALESCE(totalBytesBilled, 0) / POW(1024, 2), 2) AS totalMegabytesBilled, ROUND(COALESCE(totalBytesBilled, 0) / POW(1024, 3), 2) AS totalGigabytesBilled, diff --git a/information_schema/query_job_information.sql b/information_schema/query_job_information.sql index 6ed26a4..049fd0e 100644 --- a/information_schema/query_job_information.sql +++ b/information_schema/query_job_information.sql @@ -16,7 +16,7 @@ WITH referenced_tables AS referencedTables, labels, ROUND(SAFE_DIVIDE(total_bytes_billed, - POW(1024, 4)) * 5, 2) AS onDemandCost, + POW(1024, 4)) * 6.25, 2) AS onDemandCost, ROUND(COALESCE(total_bytes_billed, 0), 2) AS totalBytesBilled, ROUND(COALESCE(total_bytes_billed, diff --git a/information_schema/top_billed_labels.sql b/information_schema/top_billed_labels.sql index 255f589..c700934 100644 --- a/information_schema/top_billed_labels.sql +++ b/information_schema/top_billed_labels.sql @@ -41,7 +41,7 @@ BEGIN ROUND(SUM(COALESCE(totalBilledBytes, 0)) / POW(1024, 4), 2) AS totalTerabytesBilled, ROUND(SAFE_DIVIDE(SUM(COALESCE(totalBilledBytes, 0)), - POW(1024, 4)) * 5, 2) AS onDemandCost, + POW(1024, 4)) * 6.25, 2) AS onDemandCost, labelKey, labelValue FROM jobsDeduplicated diff --git a/information_schema/top_billed_queries.sql b/information_schema/top_billed_queries.sql index 9df7d0b..311b83f 100644 --- a/information_schema/top_billed_queries.sql +++ b/information_schema/top_billed_queries.sql @@ -22,7 +22,7 @@ BEGIN ROUND(COALESCE(total_bytes_billed, 0) / POW(1024, 4), 2) AS totalTerabytesBilled, ROUND(SAFE_DIVIDE(total_bytes_billed, - POW(1024, 4)) * 5, 2) AS cost, + POW(1024, 4)) * 6.25, 2) AS cost, ROUND(SAFE_DIVIDE(total_slot_ms, TIMESTAMP_DIFF(end_time, start_time, MILLISECOND)), 2) AS approximateSlotCount, ROW_NUMBER() OVER(PARTITION BY job_id ORDER BY end_time DESC) AS _rnk diff --git a/information_schema/top_billed_queries_deduplicated.sql b/information_schema/top_billed_queries_deduplicated.sql index faba08c..106cef7 100644 --- a/information_schema/top_billed_queries_deduplicated.sql +++ b/information_schema/top_billed_queries_deduplicated.sql @@ -24,7 +24,7 @@ BEGIN ROUND(COALESCE(total_bytes_billed, 0) / POW(1024, 4), 2) AS totalTerabytesBilled, ROUND(SAFE_DIVIDE(total_bytes_billed, - POW(1024, 4)) * 5, 2) AS cost, + POW(1024, 4)) * 6.25, 2) AS cost, ROUND(SAFE_DIVIDE(total_slot_ms, TIMESTAMP_DIFF(end_time, start_time, MILLISECOND)), 2) AS approximateSlotCount, ROW_NUMBER() OVER(PARTITION BY job_id ORDER BY end_time DESC) AS _rnk, diff --git a/information_schema/top_complex_queries.sql b/information_schema/top_complex_queries.sql index 7568d9c..fb54759 100644 --- a/information_schema/top_complex_queries.sql +++ b/information_schema/top_complex_queries.sql @@ -16,7 +16,7 @@ BEGIN start_time AS startTime, end_time AS endTime, total_bytes_billed AS totalBytesBilled, - ROUND(SAFE_DIVIDE(total_bytes_billed, POW(1024, 4)) * 5, 2) AS onDemandCost, + ROUND(SAFE_DIVIDE(total_bytes_billed, POW(1024, 4)) * 6.25, 2) AS onDemandCost, TIMESTAMP_DIFF(end_time, start_time, SECOND) AS executionTime, TIMESTAMP_DIFF(end_time, start_time, MILLISECOND) AS executionTimeMs, ROW_NUMBER() OVER (PARTITION BY job_id ORDER BY end_time DESC) AS _rnk diff --git a/information_schema/top_cost_users.sql b/information_schema/top_cost_users.sql index 561d4fc..2218bed 100644 --- a/information_schema/top_cost_users.sql +++ b/information_schema/top_cost_users.sql @@ -23,7 +23,7 @@ BEGIN jobsDeduplicated AS ( SELECT user, - ROUND(SAFE_DIVIDE(SUM(src.totalBytesBilled), POW(1024, 4)) * 5, 2) AS onDemandCost + ROUND(SAFE_DIVIDE(SUM(src.totalBytesBilled), POW(1024, 4)) * 6.25, 2) AS onDemandCost FROM src WHERE diff --git a/information_schema/top_costly_queries.sql b/information_schema/top_costly_queries.sql index a190658..939bba4 100644 --- a/information_schema/top_costly_queries.sql +++ b/information_schema/top_costly_queries.sql @@ -55,7 +55,7 @@ SELECT ROUND(COALESCE(totalBytesBilled, 0) / POW(1024, 4), 2) AS totalTerabytesBilled, ROUND(SAFE_DIVIDE(totalBytesBilled, - POW(1024, 4)) * 5, 2) AS onDemandCost + POW(1024, 4)) * 6.25, 2) AS onDemandCost FROM hashedQueries ORDER BY