Skip to content

Commit

Permalink
use correct field in sql queries
Browse files Browse the repository at this point in the history
  • Loading branch information
gpop63 committed Oct 19, 2023
1 parent 7c51bc8 commit f61ae91
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions x-pack/metricbeat/module/gcp/billing/billing.go
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,7 @@ SELECT
IFNULL(sku.description, '') AS sku_description,
IFNULL(service.id, '') AS service_id,
IFNULL(service.description, '') AS service_description,
ARRAY_TO_STRING(ARRAY(SELECT CONCAT(t.key, ':', t.value) FROM UNNEST(system_labels) AS t), ',') AS tags_string,
ARRAY_TO_STRING(ARRAY(SELECT CONCAT(t.key, ':', t.value) FROM UNNEST(tags) AS t), ',') AS tags_string,
(SUM(CAST(cost * 1000000 AS int64)) + SUM(IFNULL((
SELECT
SUM(CAST(c.amount * 1000000 AS int64))
Expand Down Expand Up @@ -471,7 +471,7 @@ SELECT
IFNULL(service.id, '') AS service_id,
IFNULL(service.description, '') AS service_description,
IFNULL(SAFE_CAST(price.effective_price AS float64), 0) AS effective_price,
ARRAY_TO_STRING(ARRAY(SELECT CONCAT(t.key, ':', t.value) FROM UNNEST(system_labels) AS t), ',') AS tags_string,
ARRAY_TO_STRING(ARRAY(SELECT CONCAT(t.key, ':', t.value) FROM UNNEST(tags) AS t), ',') AS tags_string,
(SUM(CAST(cost * 1000000 AS int64)) + SUM(IFNULL((
SELECT
SUM(CAST(c.amount * 1000000 AS int64))
Expand Down

0 comments on commit f61ae91

Please sign in to comment.