{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/microsoft-azure-data-factory/json-schema/microsoft-azure-data-factory-change-data-capture-resource-schema.json",
  "title": "ChangeDataCaptureResource",
  "description": "Change data capture resource type.",
  "x-generated": "2026-11-05",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/_superseded/microsoft-azure-data-factory-changedatacapture-api-openapi.yml#/components/schemas/ChangeDataCaptureResource",
  "type": "object",
  "properties": {
    "properties": {
      "$ref": "#/$defs/ChangeDataCapture",
      "description": "Properties of the change data capture.",
      "x-ms-client-flatten": true
    },
    "etag": {
      "type": "string",
      "description": "\"If etag is provided in the response body, it may also be provided as a header per the normal etag convention.  Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields.\")",
      "readOnly": true
    }
  },
  "required": [
    "properties"
  ],
  "additionalProperties": {},
  "allOf": [
    {
      "$ref": "../../../../../../common-types/resource-management/v6/types.json#/definitions/ProxyResource"
    }
  ],
  "$defs": {
    "ChangeDataCapture": {
      "type": "object",
      "description": "A Azure Data Factory object which automatically detects data changes at the source and then sends the updated data to the destination.",
      "properties": {
        "folder": {
          "$ref": "#/$defs/ChangeDataCaptureFolder",
          "description": "The folder that this CDC is in. If not specified, CDC will appear at the root level."
        },
        "description": {
          "type": "string",
          "description": "The description of the change data capture."
        },
        "sourceConnectionsInfo": {
          "type": "array",
          "description": "List of sources connections that can be used as sources in the CDC.",
          "items": {
            "$ref": "#/$defs/MapperSourceConnectionsInfo"
          },
          "x-ms-identifiers": []
        },
        "targetConnectionsInfo": {
          "type": "array",
          "description": "List of target connections that can be used as sources in the CDC.",
          "items": {
            "$ref": "#/$defs/MapperTargetConnectionsInfo"
          },
          "x-ms-identifiers": []
        },
        "policy": {
          "$ref": "#/$defs/MapperPolicy",
          "description": "CDC policy"
        },
        "allowVNetOverride": {
          "type": "boolean",
          "description": "A boolean to determine if the vnet configuration needs to be overwritten."
        },
        "status": {
          "type": "string",
          "description": "Status of the CDC as to if it is running or stopped."
        }
      },
      "required": [
        "sourceConnectionsInfo",
        "targetConnectionsInfo",
        "policy"
      ]
    },
    "ChangeDataCaptureFolder": {
      "type": "object",
      "description": "The folder that this CDC is in. If not specified, CDC will appear at the root level.",
      "properties": {
        "name": {
          "type": "string",
          "description": "The name of the folder that this CDC is in."
        }
      }
    },
    "ConnectionType": {
      "type": "string",
      "description": "Type of connection via linked service or dataset.",
      "enum": [
        "linkedservicetype"
      ],
      "x-ms-enum": {
        "name": "ConnectionType",
        "modelAsString": true,
        "values": [
          {
            "name": "linkedservicetype",
            "value": "linkedservicetype",
            "description": "linkedservicetype"
          }
        ]
      }
    },
    "DataMapperMapping": {
      "type": "object",
      "description": "Source and target table mapping details.",
      "properties": {
        "targetEntityName": {
          "type": "string",
          "description": "Name of the target table"
        },
        "sourceEntityName": {
          "type": "string",
          "description": "Name of the source table"
        },
        "sourceConnectionReference": {
          "$ref": "#/$defs/MapperConnectionReference",
          "description": "The connection reference for the source connection."
        },
        "attributeMappingInfo": {
          "$ref": "#/$defs/MapperAttributeMappings",
          "description": "This holds the user provided attribute mapping information."
        },
        "sourceDenormalizeInfo": {
          "description": "This holds the source denormalization information used while joining multiple sources."
        }
      }
    },
    "FrequencyType": {
      "type": "string",
      "description": "Frequency of period in terms of 'Hour', 'Minute' or 'Second'.",
      "enum": [
        "Hour",
        "Minute",
        "Second"
      ],
      "x-ms-enum": {
        "name": "FrequencyType",
        "modelAsString": true,
        "values": [
          {
            "name": "Hour",
            "value": "Hour",
            "description": "Hour"
          },
          {
            "name": "Minute",
            "value": "Minute",
            "description": "Minute"
          },
          {
            "name": "Second",
            "value": "Second",
            "description": "Second"
          }
        ]
      }
    },
    "LinkedServiceReference": {
      "type": "object",
      "description": "Linked service reference type.",
      "properties": {
        "type": {
          "$ref": "#/$defs/Type",
          "description": "Linked service reference type."
        },
        "referenceName": {
          "type": "string",
          "description": "Reference LinkedService name."
        },
        "parameters": {
          "type": "object",
          "description": "Arguments for LinkedService.",
          "additionalProperties": {}
        }
      },
      "required": [
        "type",
        "referenceName"
      ]
    },
    "MapperAttributeMapping": {
      "type": "object",
      "description": "Source and target column mapping details.",
      "properties": {
        "name": {
          "type": "string",
          "description": "Name of the target column."
        },
        "type": {
          "$ref": "#/$defs/MappingType",
          "description": "Type of the CDC attribute mapping. Note: 'Advanced' mapping type is also saved as 'Derived'."
        },
        "functionName": {
          "type": "string",
          "description": "Name of the function used for 'Aggregate' and 'Derived' (except 'Advanced') type mapping."
        },
        "expression": {
          "type": "string",
          "description": "Expression used for 'Aggregate' and 'Derived' type mapping."
        },
        "attributeReference": {
          "$ref": "#/$defs/MapperAttributeReference",
          "description": "Reference of the source column used in the mapping. It is used for 'Direct' mapping type only."
        },
        "attributeReferences": {
          "type": "array",
          "description": "List of references for source columns. It is used for 'Derived' and 'Aggregate' type mappings only.",
          "items": {
            "$ref": "#/$defs/MapperAttributeReference"
          },
          "x-ms-identifiers": [
            "name"
          ]
        }
      }
    },
    "MapperAttributeMappings": {
      "type": "object",
      "description": "Attribute mapping details.",
      "properties": {
        "attributeMappings": {
          "type": "array",
          "description": "List of attribute mappings.",
          "items": {
            "$ref": "#/$defs/MapperAttributeMapping"
          },
          "x-ms-identifiers": [
            "name"
          ]
        }
      }
    },
    "MapperAttributeReference": {
      "type": "object",
      "description": "Attribute reference details for the referred column.",
      "properties": {
        "name": {
          "type": "string",
          "description": "Name of the column."
        },
        "entity": {
          "type": "string",
          "description": "Name of the table."
        },
        "entityConnectionReference": {
          "$ref": "#/$defs/MapperConnectionReference",
          "description": "The connection reference for the connection."
        }
      }
    },
    "MapperConnection": {
      "type": "object",
      "description": "Source connection details.",
      "properties": {
        "linkedService": {
          "$ref": "#/$defs/LinkedServiceReference",
          "description": "Linked service reference."
        },
        "linkedServiceType": {
          "type": "string",
          "description": "Type of the linked service e.g.: AzureBlobFS."
        },
        "type": {
          "$ref": "#/$defs/ConnectionType",
          "description": "Type of connection via linked service or dataset."
        },
        "isInlineDataset": {
          "type": "boolean",
          "description": "A boolean indicating whether linked service is of type inline dataset. Currently only inline datasets are supported."
        },
        "commonDslConnectorProperties": {
          "type": "array",
          "description": "List of name/value pairs for connection properties.",
          "items": {
            "$ref": "#/$defs/MapperDslConnectorProperties"
          },
          "x-ms-identifiers": []
        }
      },
      "required": [
        "type"
      ]
    },
    "MapperConnectionReference": {
      "type": "object",
      "description": "Source or target connection reference details.",
      "properties": {
        "connectionName": {
          "type": "string",
          "description": "Name of the connection"
        },
        "type": {
          "$ref": "#/$defs/ConnectionType",
          "description": "Type of connection via linked service or dataset."
        }
      }
    },
    "MapperDslConnectorProperties": {
      "type": "object",
      "description": "Connector properties of a CDC table in terms of name / value pairs.",
      "properties": {
        "name": {
          "type": "string",
          "description": "Name of the property."
        },
        "value": {
          "description": "Value of the property."
        }
      }
    },
    "MapperPolicy": {
      "type": "object",
      "description": "CDC Policy.",
      "properties": {
        "mode": {
          "type": "string",
          "description": "Mode of running the CDC: batch vs continuous."
        },
        "recurrence": {
          "$ref": "#/$defs/MapperPolicyRecurrence",
          "description": "Defines the frequency and interval for running the CDC for batch mode."
        }
      }
    },
    "MapperPolicyRecurrence": {
      "type": "object",
      "description": "CDC policy recurrence details.",
      "properties": {
        "frequency": {
          "$ref": "#/$defs/FrequencyType",
          "description": "Frequency of period in terms of 'Hour', 'Minute' or 'Second'."
        },
        "interval": {
          "type": "integer",
          "format": "int32",
          "description": "Actual interval value as per chosen frequency."
        }
      }
    },
    "MapperSourceConnectionsInfo": {
      "type": "object",
      "description": "A object which contains list of tables and connection details for a source connection.",
      "properties": {
        "sourceEntities": {
          "type": "array",
          "description": "List of source tables for a source connection.",
          "items": {
            "$ref": "#/$defs/MapperTable"
          },
          "x-ms-identifiers": [
            "name"
          ]
        },
        "connection": {
          "$ref": "#/$defs/MapperConnection",
          "description": "Source connection details."
        }
      }
    },
    "MapperTable": {
      "type": "object",
      "description": "CDC table details.",
      "properties": {
        "name": {
          "type": "string",
          "description": "Name of the table."
        },
        "properties": {
          "$ref": "#/$defs/MapperTableProperties",
          "description": "Table properties.",
          "x-ms-client-flatten": true
        }
      }
    },
    "MapperTableProperties": {
      "type": "object",
      "description": "Properties for a CDC table.",
      "properties": {
        "schema": {
          "type": "array",
          "description": "List of columns for the source table.",
          "items": {
            "$ref": "#/$defs/MapperTableSchema"
          },
          "x-ms-identifiers": [
            "name"
          ]
        },
        "dslConnectorProperties": {
          "type": "array",
          "description": "List of name/value pairs for connection properties.",
          "items": {
            "$ref": "#/$defs/MapperDslConnectorProperties"
          },
          "x-ms-identifiers": []
        }
      }
    },
    "MapperTableSchema": {
      "type": "object",
      "description": "Schema of a CDC table in terms of column names and their corresponding data types.",
      "properties": {
        "name": {
          "type": "string",
          "description": "Name of the column."
        },
        "dataType": {
          "type": "string",
          "description": "Data type of the column."
        }
      }
    },
    "MapperTargetConnectionsInfo": {
      "type": "object",
      "description": "A object which contains list of tables and connection details for a target connection.",
      "properties": {
        "targetEntities": {
          "type": "array",
          "description": "List of source tables for a target connection.",
          "items": {
            "$ref": "#/$defs/MapperTable"
          },
          "x-ms-identifiers": [
            "name"
          ]
        },
        "connection": {
          "$ref": "#/$defs/MapperConnection",
          "description": "Source connection details."
        },
        "dataMapperMappings": {
          "type": "array",
          "description": "List of table mappings.",
          "items": {
            "$ref": "#/$defs/DataMapperMapping"
          },
          "x-ms-identifiers": [
            "targetEntityName",
            "sourceEntityName"
          ]
        },
        "relationships": {
          "type": "array",
          "description": "List of relationship info among the tables.",
          "items": {}
        }
      }
    },
    "MappingType": {
      "type": "string",
      "description": "Type of the CDC attribute mapping. Note: 'Advanced' mapping type is also saved as 'Derived'.",
      "enum": [
        "Direct",
        "Derived",
        "Aggregate"
      ],
      "x-ms-enum": {
        "name": "MappingType",
        "modelAsString": true,
        "values": [
          {
            "name": "Direct",
            "value": "Direct",
            "description": "Direct"
          },
          {
            "name": "Derived",
            "value": "Derived",
            "description": "Derived"
          },
          {
            "name": "Aggregate",
            "value": "Aggregate",
            "description": "Aggregate"
          }
        ]
      }
    },
    "Type": {
      "type": "string",
      "description": "Linked service reference type.",
      "enum": [
        "LinkedServiceReference"
      ],
      "x-ms-enum": {
        "name": "Type",
        "modelAsString": true,
        "values": [
          {
            "name": "LinkedServiceReference",
            "value": "LinkedServiceReference",
            "description": "LinkedServiceReference"
          }
        ]
      }
    }
  }
}