Skip to content

Commit

Permalink
[COST-4367] Add product_vcpu to aws_line_items_daily (#4774)
Browse files Browse the repository at this point in the history
* drop aws_line_items_daily and add product_vcpu to the columns carried through

* update unit test

---------

Co-authored-by: Luke Couzens <[email protected]>
  • Loading branch information
cgoodfred and lcouzens authored Dec 3, 2023
1 parent f02f4c4 commit ac0d1c0
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
3 changes: 3 additions & 0 deletions koku/masu/test/util/aws/test_aws_post_processor.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ def test_aws_generate_daily_data(self):
"product_productname": "AmazonEC2",
"product_instancetype": "t2.micro",
"product_region": "us-east-1",
"product_vcpu": "8",
"pricing_unit": "hours",
"resourcetags": '{"key": "value"}',
"costcategory": '{"cat": "egory"}',
Expand Down Expand Up @@ -79,6 +80,7 @@ def test_aws_generate_daily_data(self):
"product_productname": "AmazonEC2",
"product_instancetype": "t2.micro",
"product_region": "us-east-1",
"product_vcpu": "4",
"pricing_unit": "hours",
"resourcetags": '{"key": "value"}',
"costcategory": '{"cat": "egory"}',
Expand Down Expand Up @@ -111,6 +113,7 @@ def test_aws_generate_daily_data(self):
"product_instancetype": "t2.micro",
"product_region": "us-east-1",
"pricing_unit": "hours",
"product_vcpu": "8",
"resourcetags": '{"key": "value"}',
"costcategory": '{"cat": "egory"}',
"lineitem_usageamount": lineitem_usageamount,
Expand Down
1 change: 1 addition & 0 deletions koku/masu/util/aws/aws_post_processor.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,7 @@ def _generate_daily_data(self, data_frame):
"savingsplan_savingsplaneffectivecost": ["sum"],
"product_productname": ["max"],
"bill_invoiceid": ["max"],
"product_vcpu": ["max"],
}
)
columns = daily_data_frame.columns.droplevel(1)
Expand Down
4 changes: 1 addition & 3 deletions scripts/cji_scripts/migrate_trino.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,9 +164,7 @@ def main():

tables_to_drop = [
"aws_line_items",
# "aws_openshift_daily_resource_matched_temp",
# "aws_openshift_daily_tag_matched_temp",
# "reporting_ocpawscostlineitem_project_daily_summary_temp",
"aws_line_items_daily",
]
# columns_to_drop = ["ocp_matched"]
# columns_to_add = {
Expand Down

0 comments on commit ac0d1c0

Please sign in to comment.