{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/microsoft-azure-synapse-analytics/json-schema/microsoft-azure-synapse-analytics-ddlbatch-schema.json",
  "title": "DDLBatch",
  "description": "DDL batch.",
  "x-generated": "2026-11-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/microsoft-azure-synapse-analytics-databases-api-openapi.yml#/components/schemas/DDLBatch",
  "type": "object",
  "properties": {
    "ddls": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/DDLPayload"
      }
    }
  },
  "required": [
    "ddls"
  ],
  "$defs": {
    "ArtifactType": {
      "description": "Artifact type.",
      "type": "string",
      "enum": [
        "DATABASE",
        "TABLE",
        "SCHEMA",
        "VIEW",
        "FUNCTION",
        "PARTITIONINFO",
        "RELATIONSHIP"
      ],
      "x-ms-enum": {
        "name": "SASEntityType",
        "modelAsString": false
      }
    },
    "DDLPayload": {
      "description": "DDL payload",
      "type": "object",
      "properties": {
        "actionType": {
          "$ref": "#/$defs/DDLType"
        },
        "oldEntity": {
          "$ref": "#/$defs/MDEntity"
        },
        "newEntity": {
          "$ref": "#/$defs/MDEntity"
        }
      },
      "required": [
        "actionType"
      ]
    },
    "DDLType": {
      "description": "DDL type.",
      "type": "string",
      "enum": [
        "CREATE",
        "ALTER",
        "DROP"
      ],
      "x-ms-enum": {
        "name": "DDLType",
        "modelAsString": false
      }
    },
    "MDEntity": {
      "description": "MD Entity",
      "type": "object",
      "properties": {
        "name": {
          "description": "Entity Name.",
          "type": "string"
        },
        "type": {
          "$ref": "#/$defs/ArtifactType"
        },
        "id": {
          "description": "Entity Resource Id.",
          "type": "string",
          "readOnly": true
        },
        "properties": {
          "type": "object"
        }
      },
      "required": [
        "name",
        "type"
      ]
    }
  }
}