-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* Added PricingCategory for AWS (#284). Signed-off-by: Varun Mittal <[email protected]>
- Loading branch information
1 parent
dfc832e
commit 337e595
Showing
4 changed files
with
34 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
focus_converter_base/focus_converter/conversion_configs/aws-cur/pricing_category_S001.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
plan_name: conversion plan for PricingCategory | ||
conversion_type: sql_query | ||
conversion_args: > | ||
SELECT | ||
*, | ||
CASE | ||
WHEN ("product/PurchaseOption" = 'On-Demand') THEN 'On-Demand' | ||
WHEN ("product/PurchaseOption" = 'Reserved Instances') THEN 'Commitment-Based' | ||
WHEN ("product/PurchaseOption" = 'Spot Instances') THEN 'Dynamic' | ||
WHEN ("product/PurchaseOption" = 'Dedicated Hosts') THEN 'On-Demand' | ||
ELSE NULL | ||
END AS PricingCategory | ||
FROM {{ TABLE_NAME }} | ||
column: NA | ||
focus_column: PricingCategory |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
focus_converter_base/focus_converter/conversion_configs/aws/pricing_category_S001.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
plan_name: conversion plan for PricingCategory | ||
conversion_type: sql_query | ||
conversion_args: > | ||
SELECT | ||
*, | ||
CASE | ||
WHEN ("product_purchase_option" = 'On-Demand') THEN 'On-Demand' | ||
WHEN ("product_purchase_option" = 'Reserved Instances') THEN 'Commitment-Based' | ||
WHEN ("product_purchase_option" = 'Spot Instances') THEN 'Dynamic' | ||
WHEN ("product_purchase_option" = 'Dedicated Hosts') THEN 'On-Demand' | ||
ELSE NULL | ||
END AS PricingCategory | ||
FROM {{ TABLE_NAME }} | ||
column: NA | ||
focus_column: PricingCategory |