{
  "type": "record",
  "name": "AssertionInfo",
  "namespace": "com.linkedin.pegasus2avro.assertion",
  "doc": "Information about an assertion",
  "fields": [
    {
      "name": "customProperties",
      "type": {
        "type": "map",
        "values": "string"
      },
      "doc": "Custom property bag.",
      "default": {},
      "Searchable": {
        "/*": {
          "queryByDefault": true
        }
      }
    },
    {
      "name": "externalUrl",
      "type": [
        "null",
        "string"
      ],
      "doc": "URL where the reference exist",
      "default": null,
      "java": {
        "class": "com.linkedin.pegasus2avro.common.url.Url",
        "coercerClass": "com.linkedin.pegasus2avro.common.url.UrlCoercer"
      }
    },
    {
      "name": "type",
      "type": {
        "type": "enum",
        "name": "AssertionType",
        "symbols": [
          "DATASET"
        ]
      },
      "doc": "Type of assertion. Assertion types can evolve to span Datasets, Flows (Pipelines), Models, Features etc."
    },
    {
      "name": "datasetAssertion",
      "type": [
        "null",
        {
          "type": "record",
          "name": "DatasetAssertionInfo",
          "doc": "Attributes that are applicable to single-Dataset Assertions",
          "fields": [
            {
              "name": "dataset",
              "type": "string",
              "doc": "The dataset targeted by this assertion.",
              "Relationship": {
                "entityTypes": [
                  "dataset"
                ],
                "name": "Asserts"
              },
              "java": {
                "class": "com.linkedin.pegasus2avro.common.urn.Urn"
              }
            },
            {
              "name": "scope",
              "type": {
                "type": "enum",
                "name": "DatasetAssertionScope",
                "symbols": [
                  "DATASET_COLUMN",
                  "DATASET_ROWS",
                  "DATASET_SCHEMA",
                  "UNKNOWN"
                ],
                "symbolDocs": {
                  "DATASET_COLUMN": "This assertion applies to dataset columns",
                  "DATASET_ROWS": "This assertion applies to entire rows of the dataset",
                  "DATASET_SCHEMA": "This assertion applies to the schema of the dataset",
                  "UNKNOWN": "The scope of the assertion is unknown"
                }
              },
              "doc": "Scope of the Assertion. What part of the dataset does this assertion apply to?"
            },
            {
              "name": "fields",
              "type": [
                "null",
                {
                  "type": "array",
                  "items": "string"
                }
              ],
              "doc": "One or more dataset schema fields that are targeted by this assertion",
              "default": null,
              "Relationship": {
                "/*": {
                  "entityTypes": [
                    "schemaField"
                  ],
                  "name": "Asserts"
                }
              }
            },
            {
              "name": "aggregation",
              "type": [
                "null",
                {
                  "type": "enum",
                  "name": "AssertionStdAggregation",
                  "doc": "The function that is applied to the aggregation input (schema, rows, column values) before evaluating an operator.",
                  "symbols": [
                    "ROW_COUNT",
                    "COLUMNS",
                    "COLUMN_COUNT",
                    "IDENTITY",
                    "MEAN",
                    "MEDIAN",
                    "UNIQUE_COUNT",
                    "UNIQUE_PROPOTION",
                    "NULL_COUNT",
                    "NULL_PROPORTION",
                    "STDDEV",
                    "MIN",
                    "MAX",
                    "SUM",
                    "_NATIVE_"
                  ],
                  "symbolDocs": {
                    "COLUMNS": "Assertion is applied on all columns.",
                    "COLUMN_COUNT": "Assertion is applied on number of columns.",
                    "IDENTITY": "Assertion is applied on individual column value.",
                    "MAX": "Assertion is applied on column std deviation",
                    "MEAN": "Assertion is applied on column mean",
                    "MEDIAN": "Assertion is applied on column median",
                    "MIN": "Assertion is applied on column min",
                    "NULL_COUNT": "Assertion is applied on number of null values in column",
                    "NULL_PROPORTION": "Assertion is applied on proportion of null values in column",
                    "ROW_COUNT": "Assertion is applied on number of rows.",
                    "STDDEV": "Assertion is applied on column std deviation",
                    "SUM": "Assertion is applied on column sum",
                    "UNIQUE_COUNT": "Assertion is applied on number of distinct values in column",
                    "UNIQUE_PROPOTION": "Assertion is applied on proportion of distinct values in column",
                    "_NATIVE_": "Other"
                  }
                }
              ],
              "doc": "Standardized assertion operator",
              "default": null
            },
            {
              "name": "operator",
              "type": {
                "type": "enum",
                "name": "AssertionStdOperator",
                "doc": "A boolean operator that is applied on the input to an assertion, after an aggregation function has been applied.",
                "symbols": [
                  "BETWEEN",
                  "LESS_THAN",
                  "LESS_THAN_OR_EQUAL_TO",
                  "GREATER_THAN",
                  "GREATER_THAN_OR_EQUAL_TO",
                  "EQUAL_TO",
                  "NOT_NULL",
                  "CONTAIN",
                  "END_WITH",
                  "START_WITH",
                  "REGEX_MATCH",
                  "IN",
                  "NOT_IN",
                  "_NATIVE_"
                ],
                "symbolDocs": {
                  "BETWEEN": "Value being asserted is between min_value and max_value.  Requires 'minValue' & 'maxValue' parameters.",
                  "CONTAIN": "Value being asserted contains value. Requires 'value' parameter.",
                  "END_WITH": "Value being asserted ends with value. Requires 'value' parameter.",
                  "EQUAL_TO": "Value being asserted is equal to value. Requires 'value' parameter.",
                  "GREATER_THAN": "Value being asserted is greater than some value. Requires 'value' parameter.",
                  "GREATER_THAN_OR_EQUAL_TO": "Value being asserted is greater than or equal to some value. Requires 'value' parameter.",
                  "IN": "Value being asserted is one of the array values. Requires 'value' parameter.",
                  "LESS_THAN": "Value being asserted is less than a max value. Requires 'value' parameter.",
                  "LESS_THAN_OR_EQUAL_TO": "Value being asserted is less than or equal to some value. Requires 'value' parameter.",
                  "NOT_IN": "Value being asserted is not in one of the array values. Requires 'value' parameter.",
                  "NOT_NULL": "Value being asserted is not null. Requires no parameters.",
                  "REGEX_MATCH": "Value being asserted matches the regex value. Requires 'value' parameter.",
                  "START_WITH": "Value being asserted starts with value. Requires 'value' parameter.",
                  "_NATIVE_": "Other"
                }
              },
              "doc": "Standardized assertion operator"
            },
            {
              "name": "parameters",
              "type": [
                "null",
                {
                  "type": "record",
                  "name": "AssertionStdParameters",
                  "doc": "Parameters for AssertionStdOperators.",
                  "fields": [
                    {
                      "name": "value",
                      "type": [
                        "null",
                        {
                          "type": "record",
                          "name": "AssertionStdParameter",
                          "doc": "Single parameter for AssertionStdOperators.",
                          "fields": [
                            {
                              "name": "value",
                              "type": "string",
                              "doc": "The parameter value"
                            },
                            {
                              "name": "type",
                              "type": {
                                "type": "enum",
                                "name": "AssertionStdParameterType",
                                "symbols": [
                                  "STRING",
                                  "NUMBER",
                                  "LIST",
                                  "SET",
                                  "UNKNOWN"
                                ]
                              },
                              "doc": "The type of the parameter"
                            }
                          ]
                        }
                      ],
                      "doc": "The value parameter of an assertion",
                      "default": null
                    },
                    {
                      "name": "maxValue",
                      "type": [
                        "null",
                        "AssertionStdParameter"
                      ],
                      "doc": "The maxValue parameter of an assertion",
                      "default": null
                    },
                    {
                      "name": "minValue",
                      "type": [
                        "null",
                        "AssertionStdParameter"
                      ],
                      "doc": "The minValue parameter of an assertion",
                      "default": null
                    }
                  ]
                }
              ],
              "doc": "Standard parameters required for the assertion. e.g. min_value, max_value, value, columns",
              "default": null
            },
            {
              "name": "nativeType",
              "type": [
                "null",
                "string"
              ],
              "doc": "Native assertion type",
              "default": null
            },
            {
              "name": "nativeParameters",
              "type": [
                "null",
                {
                  "type": "map",
                  "values": "string"
                }
              ],
              "doc": "Native parameters required for the assertion.",
              "default": null
            },
            {
              "name": "logic",
              "type": [
                "null",
                "string"
              ],
              "default": null
            }
          ]
        }
      ],
      "doc": "Dataset Assertion information when type is DATASET",
      "default": null
    }
  ],
  "Aspect": {
    "name": "assertionInfo"
  }
}