Currently the reco tool takes in the CUR data as input and outputs both a RC recommendation and statistics about the savings from the RC vs OD.
It would be useful if the reco tool takes in both the CUR data and RC information and outputs the statistics about the savings. This would help demonstrate savings for actual RCs as well as allow what-if scenarios.
Current Behavior for plaintext output
CUR data contains activity in 5 regions
Run the athena query provided by --athena-sql and save the output as CUR_OUTPUT.csv
Run the reco tool: python3 src/ddbr.py reco --file-name CUR_OUTPUT.csv --output plain --term 1
Get plain text output providing both 1/ a recommendation on RCU/WCU for each of the 5 regions and 2/ statistics explaining the OD-only cost vs cost with recommended RC and percent savings.
Desired Behavior for plaintext output
CUR data contains activity in 5 regions
Create a CSV file ACTUAL_RC.csv with 4 columns: RegionCode (e.g. "us-east-1"), UsageType ("rcu"|"wcu"), Term ("1"|"3"), RCUnits (e.g. "100","200", etc) containing 2 rows for each region. This is similar to the CSV output of the reco tool (but doesn't include all the other columns)
Run the athena query provided by --athena-sql and save the output as CUR_OUTPUT.csv
Run the reco tool: python3 src/ddbr.py reco --file-name CUR_OUTPUT.csv --output plain --actual-rc-file-name ACTUAL_RC.csv
Get plain text output providing statistics explaining the OD-only cost vs cost with recommended RC and percent savings. Essentially the same as the current behavior without any of the "find the optimal RC amounts" because that's an input now.
Edge Case suggestions
I generally favor erroring loudly when edge cases happen, the first suggestion is an exception to that.
If CUR_OUTPUT.csv contains activity in 5 regions but ACTUAL_RC.csv only contains 2 regions (4 rows, one for RCU and one for WCU) then the missing 3 regions should be considered "ignored" and omitted from the output. The idea is that a customer is only interested in those 2 regions (maybe that could be a separate feature to limit scope to specific regions?)
If ACTUAL_RC.csv contains invalid enum values (e.g. unknown region codes, usage types, terms, or RCUnits that aren't in 100s), error!
If ACTUAL_RC.csv contains any regions not in CUR_OUTPUT.csv, error!
If ACTUAL_RC.csv contains more or less than 2 records for a region, (1 RCU record and 1 WCU record), or if the two records don't have the same Term, error!
Overview
Currently the reco tool takes in the CUR data as input and outputs both a RC recommendation and statistics about the savings from the RC vs OD.
It would be useful if the reco tool takes in both the CUR data and RC information and outputs the statistics about the savings. This would help demonstrate savings for actual RCs as well as allow what-if scenarios.
Current Behavior for plaintext output
--athena-sql
and save the output asCUR_OUTPUT.csv
python3 src/ddbr.py reco --file-name CUR_OUTPUT.csv --output plain --term 1
Desired Behavior for plaintext output
ACTUAL_RC.csv
with 4 columns:RegionCode
(e.g. "us-east-1"),UsageType
("rcu"|"wcu"),Term
("1"|"3"),RCUnits
(e.g. "100","200", etc) containing 2 rows for each region. This is similar to the CSV output of the reco tool (but doesn't include all the other columns)--athena-sql
and save the output asCUR_OUTPUT.csv
python3 src/ddbr.py reco --file-name CUR_OUTPUT.csv --output plain --actual-rc-file-name ACTUAL_RC.csv
Edge Case suggestions
I generally favor erroring loudly when edge cases happen, the first suggestion is an exception to that.
CUR_OUTPUT.csv
contains activity in 5 regions butACTUAL_RC.csv
only contains 2 regions (4 rows, one for RCU and one for WCU) then the missing 3 regions should be considered "ignored" and omitted from the output. The idea is that a customer is only interested in those 2 regions (maybe that could be a separate feature to limit scope to specific regions?)ACTUAL_RC.csv
contains invalid enum values (e.g. unknown region codes, usage types, terms, or RCUnits that aren't in 100s), error!ACTUAL_RC.csv
contains any regions not inCUR_OUTPUT.csv
, error!ACTUAL_RC.csv
contains more or less than 2 records for a region, (1 RCU record and 1 WCU record), or if the two records don't have the sameTerm
, error!