From b879e12c859768034435a7a82b504fc67eaf884f Mon Sep 17 00:00:00 2001 From: Iakov GAN <82834333+iakov-aws@users.noreply.github.com> Date: Thu, 11 Apr 2024 11:35:08 +0200 Subject: [PATCH] Update aws-marketplace-spg.yaml --- dashboards/aws-marketplace/aws-marketplace-spg.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dashboards/aws-marketplace/aws-marketplace-spg.yaml b/dashboards/aws-marketplace/aws-marketplace-spg.yaml index 12f6692f..a8b0e704 100644 --- a/dashboards/aws-marketplace/aws-marketplace-spg.yaml +++ b/dashboards/aws-marketplace/aws-marketplace-spg.yaml @@ -139,7 +139,7 @@ views: dependsOn: cur: true data: |- - CREATE OR REPLACE VIEW ${athena_database_name}.marketplace_view AS + CREATE OR REPLACE VIEW "${athena_database_name}"."marketplace_view" AS SELECT "year" "year" , "month" "month" @@ -165,6 +165,6 @@ views: , "sum"((CASE WHEN ("line_item_line_item_type" = 'SavingsPlanCoveredUsage') THEN "line_item_usage_amount" WHEN ("line_item_line_item_type" = 'DiscountedUsage') THEN "line_item_usage_amount" WHEN ("line_item_line_item_type" = 'Usage') THEN "line_item_usage_amount" ELSE 0 END)) "usage_quantity" , "sum"("line_item_unblended_cost") "unblended_cost" FROM - ${cur_table_name} + "${cur_table_name}" WHERE ((("bill_billing_period_start_date" >= ("date_trunc"('month', current_timestamp) - INTERVAL '36' MONTH)) AND (CAST("concat"("year", '-', "month", '-01') AS date) >= ("date_trunc"('month', current_date) - INTERVAL '36' MONTH))) AND ("bill_billing_entity" = 'AWS Marketplace')) GROUP BY 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21