Minimum row
This commit is contained in:
@@ -223,9 +223,10 @@ type TopDataConfig struct {
|
||||
}
|
||||
|
||||
type TopDataRowGenerationConfig struct {
|
||||
Dataset string `json:"dataset,omitempty" yaml:"dataset,omitempty"`
|
||||
Namespace string `json:"namespace,omitempty" yaml:"namespace,omitempty"`
|
||||
Mode string `json:"mode" yaml:"mode"`
|
||||
Dataset string `json:"dataset,omitempty" yaml:"dataset,omitempty"`
|
||||
Namespace string `json:"namespace,omitempty" yaml:"namespace,omitempty"`
|
||||
Mode string `json:"mode" yaml:"mode"`
|
||||
MinimumRow int `json:"minimum_row,omitempty" yaml:"minimum_row,omitempty"`
|
||||
}
|
||||
|
||||
type TopDataClassFeatInjectionConfig struct {
|
||||
@@ -860,6 +861,9 @@ func validateTopDataRowGeneration(rules []TopDataRowGenerationConfig) []error {
|
||||
default:
|
||||
failures = append(failures, fmt.Errorf("%s.mode %q is not supported", prefix, rule.Mode))
|
||||
}
|
||||
if rule.MinimumRow < 0 {
|
||||
failures = append(failures, fmt.Errorf("%s.minimum_row must be zero or greater", prefix))
|
||||
}
|
||||
key := filepath.ToSlash(dataset)
|
||||
if _, ok := seen[key]; ok {
|
||||
failures = append(failures, fmt.Errorf("%s duplicates an earlier dataset row generation rule", prefix))
|
||||
|
||||
Reference in New Issue
Block a user