{
  "type": "record",
  "Aspect": {
    "name": "assertionDryRunEvent",
    "type": "timeseries"
  },
  "name": "AssertionDryRunEvent",
  "namespace": "com.linkedin.pegasus2avro.assertion",
  "fields": [
    {
      "type": "long",
      "name": "timestampMillis",
      "doc": "The event timestamp field as epoch at UTC in milli seconds."
    },
    {
      "type": [
        "null",
        {
          "type": "record",
          "name": "TimeWindowSize",
          "namespace": "com.linkedin.pegasus2avro.timeseries",
          "fields": [
            {
              "type": {
                "type": "enum",
                "name": "CalendarInterval",
                "namespace": "com.linkedin.pegasus2avro.timeseries",
                "symbols": [
                  "SECOND",
                  "MINUTE",
                  "HOUR",
                  "DAY",
                  "WEEK",
                  "MONTH",
                  "QUARTER",
                  "YEAR"
                ]
              },
              "name": "unit",
              "doc": "Interval unit such as minute/hour/day etc."
            },
            {
              "type": "int",
              "name": "multiple",
              "default": 1,
              "doc": "How many units. Defaults to 1."
            }
          ],
          "doc": "Defines the size of a time window."
        }
      ],
      "name": "eventGranularity",
      "default": null,
      "doc": "Granularity of the event if applicable"
    },
    {
      "type": [
        {
          "type": "record",
          "name": "PartitionSpec",
          "namespace": "com.linkedin.pegasus2avro.timeseries",
          "fields": [
            {
              "TimeseriesField": {},
              "type": "string",
              "name": "partition",
              "doc": "A unique id / value for the partition for which statistics were collected,\ngenerated by applying the key definition to a given row."
            },
            {
              "type": [
                "null",
                {
                  "type": "record",
                  "name": "TimeWindow",
                  "namespace": "com.linkedin.pegasus2avro.timeseries",
                  "fields": [
                    {
                      "type": "long",
                      "name": "startTimeMillis",
                      "doc": "Start time as epoch at UTC."
                    },
                    {
                      "type": "com.linkedin.pegasus2avro.timeseries.TimeWindowSize",
                      "name": "length",
                      "doc": "The length of the window."
                    }
                  ]
                }
              ],
              "name": "timePartition",
              "default": null,
              "doc": "Time window of the partition, if we are able to extract it from the partition key."
            },
            {
              "deprecated": true,
              "type": {
                "type": "enum",
                "name": "PartitionType",
                "namespace": "com.linkedin.pegasus2avro.timeseries",
                "symbols": [
                  "FULL_TABLE",
                  "QUERY",
                  "PARTITION"
                ]
              },
              "name": "type",
              "default": "PARTITION",
              "doc": "Unused!"
            }
          ],
          "doc": "A reference to a specific partition in a dataset."
        },
        "null"
      ],
      "name": "partitionSpec",
      "default": {
        "partition": "FULL_TABLE_SNAPSHOT",
        "type": "FULL_TABLE",
        "timePartition": null
      },
      "doc": "The optional partition specification."
    },
    {
      "type": [
        "null",
        "string"
      ],
      "name": "messageId",
      "default": null,
      "doc": "The optional messageId, if provided serves as a custom user-defined unique identifier for an aspect value."
    },
    {
      "TimeseriesField": {},
      "java": {
        "class": "com.linkedin.pegasus2avro.common.urn.Urn"
      },
      "type": "string",
      "name": "asserteeUrn",
      "Urn": "Urn"
    },
    {
      "TimeseriesField": {},
      "type": {
        "type": "enum",
        "symbolDocs": {
          "COMPLETE": "The Assertion Run has completed"
        },
        "name": "AssertionRunStatus",
        "namespace": "com.linkedin.pegasus2avro.assertion",
        "symbols": [
          "COMPLETE"
        ],
        "doc": "The lifecycle status of an assertion run."
      },
      "name": "status",
      "doc": "The status of the assertion dry run as per this timeseries event."
    },
    {
      "type": [
        "null",
        {
          "type": "record",
          "name": "AssertionDryRunResult",
          "namespace": "com.linkedin.pegasus2avro.assertion",
          "fields": [
            {
              "TimeseriesField": {},
              "type": {
                "type": "enum",
                "symbolDocs": {
                  "ERROR": " The Assertion encountered an Error",
                  "FAILURE": " The Assertion Failed",
                  "INIT": " The Assertion has not yet been fully evaluated",
                  "SUCCESS": " The Assertion Succeeded"
                },
                "name": "AssertionResultType",
                "namespace": "com.linkedin.pegasus2avro.assertion",
                "symbols": [
                  "INIT",
                  "SUCCESS",
                  "FAILURE",
                  "ERROR"
                ],
                "doc": " The final result of evaluating an assertion, e.g. SUCCESS, FAILURE, or ERROR."
              },
              "name": "type",
              "doc": " The final result, e.g. either SUCCESS, FAILURE, or ERROR."
            },
            {
              "type": [
                "null",
                "long"
              ],
              "name": "rowCount",
              "default": null,
              "doc": "Number of rows for evaluated batch"
            },
            {
              "type": [
                "null",
                "long"
              ],
              "name": "missingCount",
              "default": null,
              "doc": "Number of rows with missing value for evaluated batch"
            },
            {
              "type": [
                "null",
                "long"
              ],
              "name": "unexpectedCount",
              "default": null,
              "doc": "Number of rows with unexpected value for evaluated batch"
            },
            {
              "type": [
                "null",
                {
                  "type": "map",
                  "values": "string"
                }
              ],
              "name": "nativeResults",
              "default": null,
              "doc": "Other results of evaluation"
            },
            {
              "type": [
                "null",
                {
                  "type": "record",
                  "name": "AssertionResultError",
                  "namespace": "com.linkedin.pegasus2avro.assertion",
                  "fields": [
                    {
                      "type": {
                        "type": "enum",
                        "symbolDocs": {
                          "CUSTOM_SQL_ERROR": " Error while executing a custom SQL assertion",
                          "EVALUATOR_NOT_FOUND": " No evaluator registered for the assertion type",
                          "FIELD_ASSERTION_ERROR": " Error while executing a field assertion",
                          "INSUFFICIENT_DATA": " Insufficient data to evaluate the assertion",
                          "INVALID_PARAMETERS": " Invalid parameters were detected",
                          "INVALID_SOURCE_TYPE": " Event type not supported by the specified source",
                          "METRIC_PERSISTENCE_FAILED": " Failed to persist collected metric values",
                          "METRIC_RESOLVER_INVALID_SOURCE_TYPE": " Metric resolver received an invalid source type",
                          "METRIC_RESOLVER_UNSUPPORTED_METRIC": " Metric resolver does not support the requested metric",
                          "MISSING_EVALUATION_PARAMETERS": " Missing evaluation parameters for assertion execution",
                          "NO_MATURE_BUCKET": " No new mature time bucket is available to evaluate",
                          "RESULT_EMISSION_FAILED": " Failed to emit assertion run event",
                          "SMART_ASSERTION_NOT_ENABLED": " Smart (AI-inferred) assertion cannot be evaluated because the online\n smart assertions pipeline is disabled",
                          "SOURCE_CONNECTION_ERROR": " Source is unreachable",
                          "SOURCE_QUERY_FAILED": " Source query failed to execute",
                          "STATE_PERSISTENCE_FAILED": " Failed to persist assertion state",
                          "UNKNOWN_ERROR": " Unknown error",
                          "UNSUPPORTED_PLATFORM": " Unsupported platform"
                        },
                        "name": "AssertionResultErrorType",
                        "namespace": "com.linkedin.pegasus2avro.assertion",
                        "symbols": [
                          "SOURCE_CONNECTION_ERROR",
                          "SOURCE_QUERY_FAILED",
                          "INSUFFICIENT_DATA",
                          "INVALID_PARAMETERS",
                          "INVALID_SOURCE_TYPE",
                          "UNSUPPORTED_PLATFORM",
                          "CUSTOM_SQL_ERROR",
                          "FIELD_ASSERTION_ERROR",
                          "MISSING_EVALUATION_PARAMETERS",
                          "EVALUATOR_NOT_FOUND",
                          "METRIC_RESOLVER_UNSUPPORTED_METRIC",
                          "METRIC_RESOLVER_INVALID_SOURCE_TYPE",
                          "STATE_PERSISTENCE_FAILED",
                          "METRIC_PERSISTENCE_FAILED",
                          "RESULT_EMISSION_FAILED",
                          "NO_MATURE_BUCKET",
                          "SMART_ASSERTION_NOT_ENABLED",
                          "UNKNOWN_ERROR"
                        ]
                      },
                      "name": "type",
                      "doc": " The type of error encountered"
                    },
                    {
                      "type": [
                        "null",
                        {
                          "type": "map",
                          "values": "string"
                        }
                      ],
                      "name": "properties",
                      "default": null,
                      "doc": " Additional metadata depending on the type of error"
                    }
                  ],
                  "doc": " An error encountered when evaluating an AssertionResult"
                }
              ],
              "name": "error",
              "default": null,
              "doc": " The error object if AssertionResultType is an Error"
            }
          ],
          "doc": "The result of dry running an assertion.\n\nA subset of AssertionResult without the @Searchables."
        }
      ],
      "name": "result",
      "default": null,
      "doc": "Results of assertion, present if the status is COMPLETE"
    },
    {
      "type": [
        "null",
        {
          "type": "map",
          "values": "string"
        }
      ],
      "name": "runtimeContext",
      "default": null,
      "doc": "Runtime parameters of evaluation"
    }
  ],
  "doc": "An event produced when assertion is executed in dry-run mode, e.g.\nwhen an assertion is being \"dark-tested\".\n\nThis is used primarily in Acryl Observe to test assertion inference before production release.\n\nA subset of AssertionRunEvent without the @Searchables."
}