Skip to content

Commit

Permalink
Split View and Pivot table definitions into separate blocks.
Browse files Browse the repository at this point in the history
Currently we had root, join, and event_store being separate
blocks, but view and pivot were represented by their elements
straight into the table definition. This was a bit ugly, harder
to search for, and inconsistent.
  • Loading branch information
HuwCampbell committed Feb 22, 2024
1 parent ae6f4a2 commit 6ac374e
Show file tree
Hide file tree
Showing 7 changed files with 267 additions and 219 deletions.
18 changes: 9 additions & 9 deletions client/resource_feature.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,15 +52,15 @@ func ResourceFeature() *schema.Resource {
RequiredWith: []string{"aggregation"},
},
"select": {
Type: schema.TypeString,
Required: true,
Description: "An SQL expression for the column to aggregate.",
Type: schema.TypeString,
Required: true,
Description: "An SQL expression for the column to aggregate.",
ValidateFunc: validation.StringIsNotWhiteSpace,
},
"filter": {
Type: schema.TypeString,
Optional: true,
Description: "An SQL column expression to filter with.",
Type: schema.TypeString,
Optional: true,
Description: "An SQL column expression to filter with.",
ValidateFunc: validation.StringIsNotWhiteSpace,
},
"hours": {
Expand Down Expand Up @@ -103,9 +103,9 @@ func ResourceFeature() *schema.Resource {
RequiredWith: []string{"table"},
},
"post_aggregation": {
Type: schema.TypeString,
Optional: true,
Description: "An SQL expression to apply to the result of the feature aggregation.",
Type: schema.TypeString,
Optional: true,
Description: "An SQL expression to apply to the result of the feature aggregation.",
ValidateFunc: validation.StringIsNotWhiteSpace,
},
"entity_restrictions": {
Expand Down
18 changes: 9 additions & 9 deletions client/resource_feature_template.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,15 +49,15 @@ func ResourceFeatureTemplate() *schema.Resource {
ValidateFunc: validateAnamlIdentifier(),
},
"select": {
Type: schema.TypeString,
Required: true,
Description: "An SQL expression for the column to aggregate",
Type: schema.TypeString,
Required: true,
Description: "An SQL expression for the column to aggregate",
ValidateFunc: validation.StringIsNotWhiteSpace,
},
"filter": {
Type: schema.TypeString,
Optional: true,
Description: "An SQL column expression to filter with",
Type: schema.TypeString,
Optional: true,
Description: "An SQL column expression to filter with",
ValidateFunc: validation.StringIsNotWhiteSpace,
},
"hours": {
Expand Down Expand Up @@ -98,9 +98,9 @@ func ResourceFeatureTemplate() *schema.Resource {
}, false),
},
"post_aggregation": {
Type: schema.TypeString,
Optional: true,
Description: "An SQL expression to apply to the result of the feature aggregation.",
Type: schema.TypeString,
Optional: true,
Description: "An SQL expression to apply to the result of the feature aggregation.",
ValidateFunc: validation.StringIsNotWhiteSpace,
},
"entity_restrictions": {
Expand Down
Loading

0 comments on commit 6ac374e

Please sign in to comment.