Skip to content

Commit

Permalink
Filter the cloud tables by ocp source instead.
Browse files Browse the repository at this point in the history
  • Loading branch information
myersCody committed Jan 13, 2025
1 parent b29f253 commit c6556ce
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -751,14 +751,15 @@ WITH cte_total_pv_capacity as (
aws.resource_id as aws_resource_id
FROM hive.{{schema | sqlsafe}}.reporting_ocpusagelineitem_daily_summary as ocp
JOIN hive.{{schema | sqlsafe}}.aws_openshift_daily_resource_matched_temp as aws
ON (aws.usage_start = ocp.usage_start)
AND strpos(aws.resource_id, ocp.csi_volume_handle) > 0
AND ocp.csi_volume_handle is not null
AND ocp.csi_volume_handle != ''
ON (aws.usage_start = ocp.usage_start)
AND strpos(aws.resource_id, ocp.csi_volume_handle) > 0
AND ocp.csi_volume_handle is not null
AND ocp.csi_volume_handle != ''
WHERE ocp.year = {{year}}
AND lpad(ocp.month, 2, '0') = {{month}}
AND ocp.usage_start >= {{start_date}}
AND ocp.usage_start < date_add('day', 1, {{end_date}})
AND aws.ocp_source = {{ocp_source_uuid}}
GROUP BY ocp.persistentvolume, aws.resource_id
) as combined_requests group by aws_resource_id
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -514,6 +514,7 @@ WITH cte_total_pv_capacity as (
AND lpad(ocp.month, 2, '0') = {{month}}
AND ocp.usage_start >= {{start_date}}
AND ocp.usage_start < date_add('day', 1, {{end_date}})
AND azure.ocp_source = {{ocp_source_uuid}}
GROUP BY ocp.persistentvolume, azure.resource_id
) as combined_requests group by azure_resource_id
)
Expand Down

0 comments on commit c6556ce

Please sign in to comment.