You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by GitBox <gi...@apache.org> on 2020/08/26 22:28:25 UTC

[GitHub] [incubator-pinot] jihaozh commented on a change in pull request #5930: [TE] ThirdEye User Configuration Validation - detection and subscription yaml

jihaozh commented on a change in pull request #5930:
URL: https://github.com/apache/incubator-pinot/pull/5930#discussion_r477624214



##########
File path: thirdeye/thirdeye-pinot/src/main/resources/validators/detection/detection-config-schema.json
##########
@@ -0,0 +1,214 @@
+{
+  "$schema": "http://json-schema.org/draft-04/schema#",
+  "title": "Detection Config Schema",
+
+  "type": "object",
+  "description": "YAML representation of metric or composite detection config",
+
+  "required": [ "detectionName" ],
+
+  "properties": {
+    "detectionName": {
+      "type": "string"
+    },
+    "description": {
+      "type": "string"
+    },
+    "type": {
+      "type": "string",
+      "description": "detection pipeline type",
+      "enum": [
+        "METRIC_ALERT",
+        "COMPOSITE_ALERT"
+      ]
+    },
+    "metric": {
+      "type": "string"
+    },
+    "dataset": {
+      "type": "string"
+    },
+    "active": {
+      "type": "boolean"
+    },
+    "cron": {
+      "type": "string"
+    },
+    "filters": {
+      "$ref": "#/definitions/filters"
+    },
+    "dimensionExploration": {
+      "$ref": "#/definitions/dimensionExploration"
+    },
+    "rules": {
+      "$ref": "#/definitions/rules"
+    },
+    "alerts": {
+      "$ref": "#/definitions/alerts"
+    },
+    "merger": {
+      "$ref": "#/definitions/merger"
+    },
+    "grouper": {
+      "$ref": "#/definitions/grouper"
+    }
+  },
+
+  "definitions": {
+    "alerts": {
+      "type": "array",
+      "items": {
+        "$ref": "#/definitions/subEntity"
+      }
+    },
+
+    "subEntity": {
+      "type": "object",
+      "description": "a sub-entity detection config",
+      "required": [ "name", "type" ],
+      "properties": {
+        "name": {
+          "type": "string"
+        },
+        "description": {
+          "type": "string"
+        },
+        "type": {
+          "type": "string",
+          "description": "detection pipeline type",
+          "enum": [
+            "COMPOSITE_ALERT",
+            "METRIC_ALERT"
+          ]
+        },
+        "alerts": {
+          "$ref": "#/definitions/alerts"
+        },
+        "metric": {
+          "type": "string"
+        },
+        "dataset": {
+          "type": "string"
+        },
+        "filters": {
+          "$ref": "#/definitions/filters"
+        },
+        "dimensionExploration": {
+          "$ref": "#/definitions/dimensionExploration"
+        },
+        "rules": {
+          "$ref": "#/definitions/rules"
+        },
+        "merger": {
+          "$ref": "#/definitions/merger"
+        },
+        "grouper": {
+          "$ref": "#/definitions/grouper"
+        }
+      },
+      "additionalProperties": false
+    },
+
+    "dimensionExploration": {
+      "type": "object",
+      "description": "exploration combination of dimension values",
+      "properties": {
+        "dimensions": {
+          "type": "array",
+          "description": "dimension column names",
+          "items": {
+            "type": "string"
+          }
+        },
+        "dimensionFilterMetric": {
+          "type": "string"
+        }
+      },
+      "patternProperties": {
+        "k|minValue|minContribution|minValueHourly|maxValueHourly|minValueDaily|maxValueDaily": {
+          "type": "number"
+        }
+      },
+      "additionalProperties": false
+    },
+
+    "filters": {
+      "type": "object",
+      "description": "dimension filters",
+      "patternProperties": {
+        ".*": {
+          "type": "array",
+          "description": "dimension filter values",
+          "items": {
+            "type": "string"
+          }
+        }
+      }
+    },
+
+    "eachComponent": {
+      "type": "array",
+      "items": {
+        "type": "object",
+        "required": [ "type", "name" ],
+        "properties": {
+          "type": {
+            "type": "string"

Review comment:
       shall the rule type be an enum?




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org