{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://openlineage.io/spec/facets/1-0-0/ExternalQueryRunFacet.json",
  "$defs": {
    "ExternalQueryRunFacet": {
      "allOf": [
        {
          "$ref": "https://openlineage.io/spec/1-0-2/OpenLineage.json#/$defs/RunFacet"
        },
        {
          "type": "object",
          "properties": {
            "externalQueryId": {
              "description": "Identifier for the external system",
              "type": "string",
              "example": "my-project-1234:US.bquijob_123x456_123y123z123c"
            },
            "source": {
              "description": "source of the external query",
              "type": "string",
              "example": "bigquery"
            }
          },
          "required": ["externalQueryId", "source"]
        }
      ],
      "type": "object"
    }
  },
  "type": "object",
  "properties": {
    "externalQuery": {
      "$ref": "#/$defs/ExternalQueryRunFacet"
    }
  }
}
