Reporting is another use case that should be satisfied by this tool. Since the use case deviates in terms of I/O, it's worth adding a command-line interface for now and for future expansion. Test: Unit tests included, will validate locally Change-Id: Ifade560d9898722fdd5299d06899265b70ce771f
28 lines
699 B
Go
28 lines
699 B
Go
package main
|
|
|
|
import (
|
|
"flag"
|
|
)
|
|
|
|
var optionDiff = flag.Bool("execute-diff", true, "Specifies if a new (expensive) differential should be run")
|
|
var optionDenorm = flag.Bool("denormalize-data", true, "Specifies if existing historical data should be denormalized into viewable tables in DataStudio")
|
|
var optionReport = flag.Bool("generate-report", true, "Specifies if denormalized tables should be exported to the output directory as CSV's")
|
|
|
|
type enabledOperations struct {
|
|
Diff bool
|
|
Denorm bool
|
|
Report bool
|
|
}
|
|
|
|
func getEnabledOperations() enabledOperations {
|
|
return enabledOperations{
|
|
Diff: *optionDiff,
|
|
Denorm: *optionDenorm,
|
|
Report: *optionReport,
|
|
}
|
|
}
|
|
|
|
func init() {
|
|
flag.Parse()
|
|
}
|