diff --git a/koku/masu/database/sql/reporting_ocpaws_ocp_infrastructure_back_populate.sql b/koku/masu/database/sql/reporting_ocpaws_ocp_infrastructure_back_populate.sql index eeeb349a36..2ef9b17524 100644 --- a/koku/masu/database/sql/reporting_ocpaws_ocp_infrastructure_back_populate.sql +++ b/koku/masu/database/sql/reporting_ocpaws_ocp_infrastructure_back_populate.sql @@ -15,6 +15,7 @@ INSERT INTO {{schema | sqlsafe}}.reporting_ocpusagelineitem_daily_summary ( resource_id, pod_labels, volume_labels, + all_labels, source_uuid, infrastructure_raw_cost, infrastructure_project_raw_cost, @@ -60,6 +61,7 @@ INSERT INTO {{schema | sqlsafe}}.reporting_ocpusagelineitem_daily_summary ( THEN ocp_aws.pod_labels ELSE '{}'::jsonb END as volume_labels, + ocp_aws.pod_labels as all_labels, rp.provider_id as source_uuid, {% if is_savingsplan_cost %} sum(coalesce(nullif(ocp_aws.savingsplan_effective_cost, 0), ocp_aws.unblended_cost) + coalesce(nullif(ocp_aws.markup_cost_savingsplan, 0), ocp_aws.markup_cost)) AS infrastructure_raw_cost, diff --git a/koku/masu/database/sql/reporting_ocpazure_ocp_infrastructure_back_populate.sql b/koku/masu/database/sql/reporting_ocpazure_ocp_infrastructure_back_populate.sql index 76258141a9..b4747e3721 100644 --- a/koku/masu/database/sql/reporting_ocpazure_ocp_infrastructure_back_populate.sql +++ b/koku/masu/database/sql/reporting_ocpazure_ocp_infrastructure_back_populate.sql @@ -14,6 +14,7 @@ INSERT INTO {{schema | sqlsafe}}.reporting_ocpusagelineitem_daily_summary ( resource_id, pod_labels, volume_labels, + all_labels, source_uuid, infrastructure_raw_cost, infrastructure_project_raw_cost, @@ -59,6 +60,7 @@ INSERT INTO {{schema | sqlsafe}}.reporting_ocpusagelineitem_daily_summary ( THEN ocp_azure.pod_labels ELSE '{}'::jsonb END as volume_labels, + ocp_azure.pod_labels as all_labels, rp.provider_id as source_uuid, sum(ocp_azure.pretax_cost + ocp_azure.markup_cost) AS infrastructure_raw_cost, sum(ocp_azure.pod_cost + ocp_azure.project_markup_cost) AS infrastructure_project_raw_cost, diff --git a/koku/masu/database/sql/reporting_ocpgcp_ocp_infrastructure_back_populate.sql b/koku/masu/database/sql/reporting_ocpgcp_ocp_infrastructure_back_populate.sql index d02f894de1..f3c82258ea 100644 --- a/koku/masu/database/sql/reporting_ocpgcp_ocp_infrastructure_back_populate.sql +++ b/koku/masu/database/sql/reporting_ocpgcp_ocp_infrastructure_back_populate.sql @@ -14,6 +14,7 @@ INSERT INTO {{schema | sqlsafe}}.reporting_ocpusagelineitem_daily_summary ( resource_id, pod_labels, volume_labels, + all_labels, cost_category_id, source_uuid, infrastructure_raw_cost, @@ -59,6 +60,7 @@ INSERT INTO {{schema | sqlsafe}}.reporting_ocpusagelineitem_daily_summary ( THEN ocp_gcp.pod_labels ELSE '{}'::jsonb END as volume_labels, + ocp_gcp.pod_labels as all_labels, max(ocp_gcp.cost_category_id) as cost_category_id, rp.provider_id as source_uuid, sum(ocp_gcp.unblended_cost + ocp_gcp.markup_cost + ocp_gcp.credit_amount) AS infrastructure_raw_cost,