{
  "type": "record",
  "name": "DataProcessInstanceRunEvent",
  "namespace": "com.linkedin.pegasus2avro.dataprocess",
  "doc": "An event representing the current status of data process run.\nDataProcessRunEvent should be used for reporting the status of a dataProcess' run.",
  "fields": [
    {
      "name": "timestampMillis",
      "type": "long",
      "doc": "The event timestamp field as epoch at UTC in milli seconds."
    },
    {
      "name": "eventGranularity",
      "type": [
        "null",
        {
          "type": "record",
          "name": "TimeWindowSize",
          "namespace": "com.linkedin.pegasus2avro.timeseries",
          "doc": "Defines the size of a time window.",
          "fields": [
            {
              "name": "unit",
              "type": {
                "type": "enum",
                "name": "CalendarInterval",
                "symbols": [
                  "SECOND",
                  "MINUTE",
                  "HOUR",
                  "DAY",
                  "WEEK",
                  "MONTH",
                  "QUARTER",
                  "YEAR"
                ]
              },
              "doc": "Interval unit such as minute/hour/day etc."
            },
            {
              "name": "multiple",
              "type": "int",
              "doc": "How many units. Defaults to 1.",
              "default": 1
            }
          ]
        }
      ],
      "doc": "Granularity of the event if applicable",
      "default": null
    },
    {
      "name": "partitionSpec",
      "type": [
        {
          "type": "record",
          "name": "PartitionSpec",
          "namespace": "com.linkedin.pegasus2avro.timeseries",
          "doc": "Defines how the data is partitioned",
          "fields": [
            {
              "name": "type",
              "type": {
                "type": "enum",
                "name": "PartitionType",
                "symbols": [
                  "FULL_TABLE",
                  "QUERY",
                  "PARTITION"
                ]
              },
              "default": "PARTITION"
            },
            {
              "name": "partition",
              "type": "string",
              "doc": "String representation of the partition",
              "TimeseriesField": {}
            },
            {
              "name": "timePartition",
              "type": [
                "null",
                {
                  "type": "record",
                  "name": "TimeWindow",
                  "fields": [
                    {
                      "name": "startTimeMillis",
                      "type": "long",
                      "doc": "Start time as epoch at UTC."
                    },
                    {
                      "name": "length",
                      "type": "TimeWindowSize",
                      "doc": "The length of the window."
                    }
                  ]
                }
              ],
              "doc": "Time window of the partition if applicable",
              "default": null
            }
          ]
        },
        "null"
      ],
      "doc": "The optional partition specification.",
      "default": {
        "partition": "FULL_TABLE_SNAPSHOT",
        "type": "FULL_TABLE",
        "timePartition": null
      }
    },
    {
      "name": "messageId",
      "type": [
        "null",
        "string"
      ],
      "doc": "The optional messageId, if provided serves as a custom user-defined unique identifier for an aspect value.",
      "default": null
    },
    {
      "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": "status",
      "type": {
        "type": "enum",
        "name": "DataProcessRunStatus",
        "symbols": [
          "STARTED",
          "COMPLETE"
        ],
        "symbolDocs": {
          "STARTED": "The status where the Data processing run is in."
        }
      },
      "TimeseriesField": {}
    },
    {
      "name": "attempt",
      "type": [
        "null",
        "int"
      ],
      "doc": "Return the try number that this Instance Run is in",
      "default": null
    },
    {
      "name": "result",
      "type": [
        "null",
        {
          "type": "record",
          "name": "DataProcessInstanceRunResult",
          "fields": [
            {
              "name": "type",
              "type": {
                "type": "enum",
                "name": "RunResultType",
                "symbols": [
                  "SUCCESS",
                  "FAILURE",
                  "SKIPPED",
                  "UP_FOR_RETRY"
                ],
                "symbolDocs": {
                  "FAILURE": " The Run Failed",
                  "SKIPPED": " The Run Skipped",
                  "SUCCESS": " The Run Succeeded",
                  "UP_FOR_RETRY": " The Run Failed and will Retry"
                }
              },
              "doc": " The final result, e.g. SUCCESS, FAILURE, SKIPPED, or UP_FOR_RETRY."
            },
            {
              "name": "nativeResultType",
              "type": "string",
              "doc": "It identifies the system where the native result comes from like Airflow, Azkaban, etc.."
            }
          ]
        }
      ],
      "doc": "The final result of the Data Processing run.",
      "default": null,
      "TimeseriesField": {}
    }
  ],
  "Aspect": {
    "name": "dataProcessInstanceRunEvent",
    "type": "timeseries"
  }
}