{
	"$schema": "http://json-schema.org/draft-07/schema#",
	"$id": "https://raw.githubusercontent.com/qlik-oss/schemas/refs/heads/main/qtcp/task.settings.registereddata.schema.json",
	"title": "Registered Data Task Settings",
	"description": "Schema for Registered Data task settings configuration",
	"type": "object",
	"additionalProperties": false,
	"required": ["artifactsLocation"],
	"properties": {
		"fullLoadOnly": {
			"$ref": "task.settings.common.schema.json#/definitions/fullLoadOnly-True",
			"description": "Defines the change detection to Compare with current storage (true) or Incremental using high watermark (false)"
		},
		"ddlHandlingPolicy": {
			"$ref": "task.settings.common.schema.json#/definitions/ddlHandlingPolicy"
		},
		"artifactsSettings": {
			"$ref": "task.settings.common.schema.json#/definitions/artifactsSettings-Standard"
		},
		"artifactsLocation": {
			"$ref": "task.settings.common.schema.json#/definitions/artifactsLocationWithDatabase"
		},
		"taskRuntime": {
			"type": "object",
			"description": "Task runtime configuration",
			"additionalProperties": false,
			"properties": {
				"tableUpdateConcurrency": {
					"$ref": "task.settings.common.schema.json#/definitions/tableUpdateConcurrency"
				},
				"warehouseSelection": {
					"$ref": "task.settings.common.schema.json#/definitions/warehouseSelection"
				}
			}
		},
		"catalogIntegration": {
			"$ref": "task.settings.common.schema.json#/definitions/catalogIntegration"
		},
		"tableTypeSettings": {
			"$ref": "task.settings.common.schema.json#/definitions/tableTypeSettings"
		},
		"viewType": {
			"$ref": "task.settings.common.schema.json#/definitions/viewType"
		},
		"incrementalSettings": {
			"type": "object",
			"description": "Incremental loading settings",
			"additionalProperties": false,
			"properties": {
				"registeredType": {
					"type": "string",
					"description": "Type of registered incremental loading",
					"enum": ["NONE", "REPLICATE", "WATERMARK", "STITCH"],
					"default": "NONE"
				},
				"watermarkColumnName": {
					"type": "object",
					"description": "Column used as the watermark for incremental loading",
					"additionalProperties": false,
					"properties": {
						"expressionStatement": {
							"type": "string",
							"description": "Expression identifying the watermark column"
						}
					}
				},
				"useBatchTimeAsFromDate": {
					"type": "boolean",
					"description": "Whether to use batch time as from date",
					"enum": [true, false],
					"default": false
				},
				"fromDateColumnName": {
					"type": "object",
					"description": "Column used as the from-date for incremental loading",
					"additionalProperties": false,
					"properties": {
						"expressionStatement": {
							"type": "string",
							"description": "Expression identifying the from-date column"
						}
					}
				},
				"useSameTableAsCt": {
					"type": "boolean",
					"description": "Whether to use same table as CT",
					"enum": [true, false],
					"default": false
				},
				"ctTableName": {
					"type": "object",
					"description": "Name of the change table (CT) used for incremental loading",
					"additionalProperties": false,
					"properties": {
						"expressionStatement": {
							"type": "string",
							"description": "Expression identifying the CT table name"
						}
					}
				},
				"softDeleteSupport": {
					"type": "boolean",
					"description": "Whether soft delete is supported",
					"enum": [true, false],
					"default": false
				},
				"softDeleteExpression": {
					"type": "object",
					"description": "Expression identifying soft-deleted rows",
					"additionalProperties": false,
					"properties": {
						"expressionStatement": {
							"type": "string",
							"description": "Expression evaluating whether a row was soft-deleted"
						}
					}
				},
				"priorImageSupport": {
					"type": "boolean",
					"description": "Whether prior image is supported",
					"enum": [true, false],
					"default": false
				},
				"priorImageExpression": {
					"type": "object",
					"description": "Expression identifying prior-image (before) rows",
					"additionalProperties": false,
					"properties": {
						"expressionStatement": {
							"type": "string",
							"description": "Expression evaluating whether a row is a prior image"
						}
					}
				}
			}
		}
	}
}
