{
  "type": "record",
  "Aspect": {
    "name": "batchTestRunEvent",
    "type": "timeseries"
  },
  "name": "BatchTestRunEvent",
  "namespace": "com.linkedin.pegasus2avro.test",
  "fields": [
    {
      "Searchable": {
        "fieldName": "lastCompletedTime",
        "fieldType": "DATETIME"
      },
      "type": "long",
      "name": "timestampMillis",
      "doc": "The event timestamp field as epoch at UTC in milli seconds."
    },
    {
      "Searchable": {
        "fieldName": "lastRunId",
        "fieldType": "KEYWORD"
      },
      "TimeseriesField": {},
      "type": [
        "null",
        "string"
      ],
      "name": "runId",
      "default": null,
      "doc": "Identifier for the test engine run that produced this event."
    },
    {
      "TimeseriesField": {},
      "type": {
        "type": "enum",
        "symbolDocs": {
          "COMPLETE": "The Test Run has completed",
          "RUNNING": "The Test is currently in progress"
        },
        "name": "BatchTestRunStatus",
        "namespace": "com.linkedin.pegasus2avro.test",
        "symbols": [
          "RUNNING",
          "COMPLETE"
        ]
      },
      "name": "status",
      "doc": "The status of the Test run as per this timeseries event."
    },
    {
      "type": [
        "null",
        {
          "type": "record",
          "name": "BatchTestRunResult",
          "namespace": "com.linkedin.pegasus2avro.test",
          "fields": [
            {
              "type": "long",
              "name": "passingCount",
              "doc": "Number of assets that were passing the test."
            },
            {
              "type": "long",
              "name": "failingCount",
              "doc": "Number of assets that were failing the test."
            },
            {
              "type": [
                "null",
                "string"
              ],
              "name": "testDefinition",
              "default": null,
              "doc": "Test definition that was used to run the test."
            },
            {
              "type": [
                "null",
                {
                  "type": "record",
                  "name": "TestReport",
                  "namespace": "com.linkedin.pegasus2avro.test",
                  "fields": [
                    {
                      "type": [
                        "null",
                        {
                          "type": "record",
                          "name": "TestActionsReport",
                          "namespace": "com.linkedin.pegasus2avro.test",
                          "fields": [
                            {
                              "type": [
                                "null",
                                {
                                  "type": "array",
                                  "items": {
                                    "type": "record",
                                    "name": "TestActionsError",
                                    "namespace": "com.linkedin.pegasus2avro.test",
                                    "fields": [
                                      {
                                        "type": "string",
                                        "name": "actionType",
                                        "doc": "The type of action being taken in this test"
                                      },
                                      {
                                        "java": {
                                          "class": "com.linkedin.pegasus2avro.common.urn.Urn"
                                        },
                                        "type": [
                                          "null",
                                          "string"
                                        ],
                                        "name": "urn",
                                        "default": null,
                                        "doc": "The asset urn related to this error",
                                        "Urn": "Urn"
                                      },
                                      {
                                        "type": [
                                          "null",
                                          "string"
                                        ],
                                        "name": "message",
                                        "default": null,
                                        "doc": "Any additional info about this error"
                                      }
                                    ],
                                    "doc": "Error related to the actions applied in this test"
                                  }
                                }
                              ],
                              "name": "errors",
                              "default": null,
                              "doc": "Errors related to the actions applied in this test"
                            },
                            {
                              "type": [
                                "null",
                                "long"
                              ],
                              "name": "totalEntityCount",
                              "default": null,
                              "doc": "The total number of entities that are affected by the actions of this test"
                            },
                            {
                              "type": [
                                "null",
                                "long"
                              ],
                              "name": "processedEntityCount",
                              "default": null,
                              "doc": "The number of entities that have already been acted upon by this test automation"
                            }
                          ],
                          "doc": "Report related to the actions applied in this test"
                        }
                      ],
                      "name": "actions",
                      "default": null,
                      "doc": "Report related to the actions applied in this test"
                    }
                  ]
                }
              ],
              "name": "report",
              "default": null,
              "doc": "Reporting information about the run event of this metadata test"
            }
          ],
          "doc": "The result of running a batch metadata test"
        }
      ],
      "name": "result",
      "default": null,
      "doc": "Results of test, present if the status is COMPLETE"
    },
    {
      "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."
    }
  ],
  "doc": "An event representing the current status of evaluating a batch metadata test (run offline)"
}