{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "https://raw.githubusercontent.com/qlik-oss/schemas/refs/heads/main/qtcp/task.settings.common.schema.json",
  "title": "Common Task Settings Definitions",
  "description": "Shared definitions for task.settings schemas to promote reusability and consistency",
  "definitions": {
    "fullLoadOnly-True": {
      "type": "boolean",
      "description": "Indicates if only full load is performed (no CDC)",
      "enum": [true, false],
      "default": true
    },
    "fullLoadOnly-False": {
      "type": "boolean",
      "description": "Indicates if only full load is performed (no CDC)",
      "enum": [true, false],
      "default": false
    },
    "viewType": {
      "type": "string",
      "description": "Type of view",
      "enum": ["DEFAULT", "SECURE_VIEW"],
      "default": "DEFAULT"
    },
    "ddlHandlingPolicy": {
      "type": "object",
      "description": "DDL handling policy",
      "additionalProperties": false,
      "properties": {
        "addColumn": {
          "type": "string",
          "description": "Policy for adding columns",
          "enum": ["APPLY_TO_TARGET", "IGNORE", "SUSPEND_TABLE", "STOP_TASK"],
          "default": "APPLY_TO_TARGET"
        },
        "changeColumnType": {
          "type": "string",
          "description": "Policy for changing column type",
          "enum": ["APPLY_TO_TARGET", "IGNORE", "SUSPEND_TABLE", "STOP_TASK"],
          "default": "IGNORE"
        },
        "renameTable": {
          "type": "string",
          "description": "Policy for renaming tables",
          "enum": ["APPLY_TO_TARGET", "IGNORE", "SUSPEND_TABLE", "STOP_TASK"],
          "default": "SUSPEND_TABLE"
        },
        "renameColumn": {
          "type": "string",
          "description": "Policy for renaming columns",
          "enum": ["APPLY_TO_TARGET", "IGNORE", "SUSPEND_TABLE", "STOP_TASK"],
          "default": "SUSPEND_TABLE"
        },
        "dropTable": {
          "type": "string",
          "description": "Policy for dropping tables",
          "enum": ["APPLY_TO_TARGET", "IGNORE", "SUSPEND_TABLE", "STOP_TASK"],
          "default": "IGNORE"
        },
        "dropColumn": {
          "type": "string",
          "description": "Policy for dropping columns",
          "enum": ["APPLY_TO_TARGET", "IGNORE", "SUSPEND_TABLE", "STOP_TASK"],
          "default": "IGNORE"
        },
        "truncateTable": {
          "type": "string",
          "description": "Policy for truncating tables",
          "enum": ["APPLY_TO_TARGET", "IGNORE", "SUSPEND_TABLE", "STOP_TASK"],
          "default": "IGNORE"
        },
        "createTable": {
          "type": "string",
          "description": "Policy for creating tables",
          "enum": ["APPLY_TO_TARGET", "IGNORE", "SUSPEND_TABLE", "STOP_TASK"],
          "default": "APPLY_TO_TARGET"
        },
        "addColumnRoot": {
            "type": "string",
            "description": "Policy for adding root columns (for streaming transform task only)",
            "enum": ["APPLY_TO_TARGET", "IGNORE", "SUSPEND_TABLE", "STOP_TASK"],
            "default": "APPLY_TO_TARGET"
        },
        "addColumnStruct": {
            "type": "string",
            "description": "Policy for adding struct columns (for streaming transform task only)",
            "enum": ["APPLY_TO_TARGET", "IGNORE", "SUSPEND_TABLE", "STOP_TASK"],
            "default": "APPLY_TO_TARGET"
        }
      }
    },
    "catalogIntegration": {
      "type": "object",
      "description": "Catalog integration settings",
      "additionalProperties": false,
      "properties": {
        "publishDatasets": {
          "type": "boolean",
          "description": "Whether to publish datasets to catalog",
          "enum": [true, false],
          "default": false
        }
      }
    },
    "artifactsLocationWithDatabase": {
      "type": "object",
      "description": "Location for artifacts with database",
      "additionalProperties": false,
      "required": ["internalSchema", "taskSchema", "databaseName"],
      "properties": {
        "internalSchema": {
          "type": "string",
          "description": "Internal schema reference"
        },
        "taskSchema": {
          "type": "string",
          "description": "Task schema reference"
        },
        "databaseName": {
          "type": "string",
          "description": "Database name reference"
        }
      }
    },
    "artifactsLocationWithDataAssetSchema": {
      "type": "object",
      "description": "Location for artifacts with data asset schema",
      "additionalProperties": false,
      "properties": {
        "dataAssetSchema": {
            "type": "string",
            "description": "Data asset schema reference",
            "example": "{{task.transform-of1w.dataAssetSchema}}"
        }
      }
    },
    "artifactsLocation": {
      "type": "object",
      "description": "Location for artifacts (without database)",
      "additionalProperties": false,
      "required": ["internalSchema", "taskSchema"],
      "properties": {
        "internalSchema": {
          "type": "string",
          "description": "Internal schema reference"
        },
        "taskSchema": {
          "type": "string",
          "description": "Task schema reference"
        }
      }
    },
    "artifactsSettings-WithDeletedRows": {
      "type": "object",
      "description": "Artifacts settings configuration",
      "additionalProperties": false,
      "properties": {
        "liveViewsEnabled": {
          "type": "boolean",
          "description": "Whether live views are enabled",
          "enum": [true, false],
          "default": false
        },
        "historyEnabled": {
          "type": "boolean",
          "description": "Whether history is enabled",
          "enum": [true, false],
          "default": false
        },
        "materialized": {
          "type": "boolean",
          "description": "Whether artifacts are materialized",
          "enum": [true, false],
          "default": false
        },
        "changeTablesEnabled": {
          "type": "boolean",
          "description": "Whether change tables are enabled",
          "enum": [true, false],
          "default": false
        },
        "currentTableSuffix": {
          "type": "string",
          "description": "Suffix for current tables",
          "example": "__current"
        },
        "reloadType": {
          "type": "string",
          "description": "Type of reload operation (TRUNCATE_AND_INSERT, COMPARE_AND_APPLY are not supported for iceberg transform tasks)",
          "enum": ["COMPARE_AND_APPLY_WITH_DELETED_ROWS", "COMPARE_AND_APPLY_WITHOUT_DELETED_ROWS", "DROP_AND_CREATE", "TRUNCATE_AND_INSERT", "COMPARE_AND_APPLY"],
          "default": "COMPARE_AND_APPLY_WITH_DELETED_ROWS"
        },
        "artifactsPrefix": {
          "type": "string",
          "description": "Prefix for artifacts"
        }
      }
    },
    "artifactsSettings-Standard": {
      "type": "object",
      "description": "Artifacts settings configuration",
      "additionalProperties": false,
      "properties": {
        "liveViewsEnabled": {
          "type": "boolean",
          "description": "Whether live views are enabled",
          "enum": [true, false],
          "default": false
        },
        "historyEnabled": {
          "type": "boolean",
          "description": "Whether history is enabled",
          "enum": [true, false],
          "default": false
        },
        "materialized": {
          "type": "boolean",
          "description": "Whether artifacts are materialized",
          "enum": [true, false],
          "default": false
        },
        "changeTablesEnabled": {
          "type": "boolean",
          "description": "Whether change tables are enabled",
          "enum": [true, false],
          "default": false
        },
        "currentTableSuffix": {
          "type": "string",
          "description": "Suffix for current tables",
          "example": "__current"
        },
        "reloadType": {
          "type": "string",
          "description": "Type of reload operation",
          "enum": ["COMPARE_AND_APPLY_WITH_DELETED_ROWS", "COMPARE_AND_APPLY_WITHOUT_DELETED_ROWS", "DROP_AND_CREATE", "TRUNCATE_AND_INSERT", "COMPARE_AND_APPLY"],
          "default": "COMPARE_AND_APPLY"
        },
        "artifactsPrefix": {
          "type": "string",
          "description": "Prefix for artifacts"
        }
      }
    },
    "tableUpdateConcurrency": {
      "type": "integer",
      "description": "Number of concurrent table updates",
      "minimum": 1,
      "default": 10
    },
    "warehouseSelection": {
      "type": "object",
      "description": "Warehouse selection configuration",
      "additionalProperties": false,
      "required": ["warehouseName"],
      "properties": {
        "warehouseName": {
          "type": "string",
          "description": "Warehouse name reference"
        }
      }
    },
    "icebergSettings": {
      "type": "object",
      "description": "Settings for Iceberg tables",
      "additionalProperties": false,
      "properties": {
        "snowflakeExternalVolume": {
          "type": "string",
          "description": "Snowflake external volume name"
        },
        "folderLocationType": {
          "type": "string",
          "description": "Type of folder location",
          "enum": ["NONE", "DATA_ASSET_NAME", "ROOT_FOLDER", "SPECIFIC_FOLDER"],
          "default": "DATA_ASSET_NAME"
        },
        "specificFolder": {
          "type": "string",
          "description": "Specific folder path when folderLocationType is SPECIFIC_FOLDER"
        },
        "enableOpenCatalogSync": {
          "type": "boolean",
          "description": "Whether to enable open catalog sync",
          "enum": [true, false],
          "default": false
        },
        "snowflakeOpenCatalog": {
          "type": "string",
          "description": "Snowflake open catalog name"
        }
      }
    },
    "tableTypeSettings": {
      "type": "object",
      "description": "Table type configuration",
      "additionalProperties": false,
      "properties": {
        "tableType": {
          "type": "string",
          "description": "Type of table",
          "enum": ["REGULAR", "ICEBERG"],
          "default": "REGULAR"
        },
        "icebergSettings": {
          "$ref": "#/definitions/icebergSettings"
        }
      }
    },
    "locationSettings": {
      "type": "object",
      "description": "Location settings configuration",
      "properties": {
        "folderLocationType": {
          "type": "string",
          "description": "Type of folder location",
          "enum": ["NONE", "DATA_ASSET_NAME", "ROOT_FOLDER", "SPECIFIC_FOLDER"],
          "default": "DATA_ASSET_NAME"
        },
        "specificFolder": {
          "type": "string",
          "description": "Path to specific folder when folderLocationType is SPECIFIC_FOLDER"
        }
      },
      "additionalProperties": false
    },
    "proxySettings": {
      "type": "object",
      "description": "Proxy settings",
      "additionalProperties": false,
      "properties": {
        "proxyOdbc": {
          "type": "boolean",
          "description": "Enable ODBC proxy",
          "enum": [true, false],
          "default": false
        },
        "proxyStorage": {
          "type": "boolean",
          "description": "Enable storage proxy",
          "enum": [true, false],
          "default": false
        }
      }
    },
    "applyChangesOptionsChangeProcessingTuning": {
      "type": "object",
      "description": "Change processing tuning configuration for apply changes",
      "additionalProperties": false,
      "properties": {
        "batchApplyEnabled": {
          "type": "boolean",
          "description": "Is batch apply enabled",
          "enum": [true, false],
          "default": false
        },
        "applyChangesMultipleTablesConcurrently": {
          "type": "boolean",
          "description": "Apply changes to multiple tables concurrently",
          "enum": [true, false],
          "default": false
        },
        "maxTables": {
          "type": "integer",
          "description": "Maximum number of tables for concurrent change processing",
          "default": 5
        }
      }
    },
    "batchApply": {
      "type": "object",
      "description": "Batch apply configuration",
      "additionalProperties": false,
      "properties": {
        "applyIntervalMin": {
          "type": "integer",
          "description": "Apply interval in minutes",
          "default": 1
        },
        "applyIntervalMax": {
          "type": "integer",
          "description": "Apply interval max value",
          "default": 30
        },
        "forceApplyMemory": {
          "type": "integer",
          "description": "Force apply memory",
          "default": 500
        }
      }
    },
    "batchSplitSize": {
      "type": "object",
      "description": "Batch split size configuration",
      "additionalProperties": false,
      "properties": {
        "isChecked": {
          "type": "boolean",
          "description": "Is batch split size checked",
          "enum": [true, false],
          "default": false
        },
        "value": {
          "type": "integer",
          "description": "Batch split size value",
          "default": 10000
        }
      }
    },
    "transactionalApply": {
      "type": "object",
      "description": "Transactional apply configuration",
      "additionalProperties": false,
      "properties": {
        "transactionMinChanges": {
          "type": "integer",
          "description": "Transaction min changes",
          "default": 1000
        },
        "batchTransactionsMaxTime": {
          "type": "integer",
          "description": "Batch Transaction max time",
          "default": 1
        }
      }
    },
    "transactionTuning-TotalMemoryTrue": {
      "type": "object",
      "description": "Transaction tuning configuration with total memory enabled by default",
      "additionalProperties": false,
      "properties": {
        "cacheSize": {
          "type": "integer",
          "description": "Transaction cache size",
          "default": 50
        },
        "transactionTotalMemory": {
          "type": "object",
          "description": "Transaction total memory",
          "additionalProperties": false,
          "properties": {
            "isChecked": {
              "type": "boolean",
              "description": "Is transaction total checked",
              "enum": [true, false],
              "default": true
            },
            "value": {
              "type": "integer",
              "description": "Transaction total value",
              "default": 1024
            }
          }
        },
        "transactionDuration": {
          "type": "object",
          "description": "Transaction duration configuration",
          "additionalProperties": false,
          "properties": {
            "isChecked": {
              "type": "boolean",
              "description": "Is transaction duration checked",
              "enum": [true, false],
              "default": false
            },
            "value": {
              "type": "integer",
              "description": "Transaction duration value",
              "default": 60
            }
          }
        },
        "offloadTransactions": {
          "type": "object",
          "description": "Offload transactions configuration",
          "additionalProperties": false,
          "properties": {
            "storeRecoveryData": {
              "type": "boolean",
              "description": "Store recovery data",
              "enum": [true, false],
              "default": false
            },
            "applyUsingMerge": {
              "type": "boolean",
              "description": "Apply using merge",
              "enum": [true, false],
              "default": false
            },
            "optimizeInserts": {
              "type": "boolean",
              "description": "Optimize inserts",
              "enum": [true, false],
              "default": false
            },
            "deleteAndInsertOnPkUpdate": {
              "type": "boolean",
              "description": "Delete and insert on primary key update",
              "enum": [true, false],
              "default": false
            },
            "deleteAsTombstone": {
              "type": "boolean",
              "description": "Delete as tombstone",
              "enum": [true, false],
              "default": false
            }
          }
        }
      }
    },
    "transactionTuning-TotalMemoryFalse": {
      "type": "object",
      "description": "Transaction tuning configuration with total memory disabled by default",
      "additionalProperties": false,
      "properties": {
        "cacheSize": {
          "type": "integer",
          "description": "Transaction cache size",
          "default": 50
        },
        "transactionTotalMemory": {
          "type": "object",
          "description": "Transaction total memory settings",
          "additionalProperties": false,
          "properties": {
            "isChecked": {
              "type": "boolean",
              "description": "Enable total memory for transaction",
              "enum": [true, false],
              "default": false
            },
            "value": {
              "type": "integer",
              "description": "Transaction total memory value",
              "default": 1024
            }
          }
        },
        "transactionDuration": {
          "type": "object",
          "description": "Transaction duration settings",
          "additionalProperties": false,
          "properties": {
            "isChecked": {
              "type": "boolean",
              "description": "Enable transaction duration setting",
              "enum": [true, false],
              "default": false
            },
            "value": {
              "type": "integer",
              "description": "Transaction duration value",
              "default": 60
            }
          }
        },
        "offloadTransactions": {
          "type": "object",
          "description": "Offload transactions settings",
          "additionalProperties": false,
          "properties": {
            "storeRecoveryData": {
              "type": "boolean",
              "description": "Enable storing recovery data for offloaded transactions",
              "enum": [true, false],
              "default": false
            },
            "applyUsingMerge": {
              "type": "boolean",
              "description": "Enable applying changes using merge for offloaded transactions",
              "enum": [true, false],
              "default": false
            },
            "optimizeInserts": {
              "type": "boolean",
              "description": "Enable optimization of inserts for offloaded transactions",
              "enum": [true, false],
              "default": false
            },
            "deleteAndInsertOnPkUpdate": {
              "type": "boolean",
              "description": "Enable delete and insert on primary key update for offloaded transactions",
              "enum": [true, false],
              "default": false
            },
            "deleteAsTombstone": {
              "type": "boolean",
              "description": "Enable delete as tombstone for offloaded transactions",
              "enum": [true, false],
              "default": false
            }
          }
        }
      }
    },
    "characterSubstitution": {
      "type": "object",
      "description": "Character substitution settings",
      "additionalProperties": false,
      "properties": {
        "sourceTargetCharacters": {
          "type": "array",
          "description": "Source and target characters for substitution",
          "items": {
            "type": "string",
            "description": "Character for substitution"
          }
        },
        "validationSet": {
          "type": "object",
          "description": "Validation set settings",
          "additionalProperties": false,
          "properties": {
            "substituteCharacter": {
              "type": "integer",
              "description": "Substitute character value"
            }
          }
        }
      }
    },
    "fileAttributesGeneral-Landing": {
      "type": "object",
      "description": "General file settings",
      "additionalProperties": false,
      "properties": {
        "maxFileSize": {
          "type": "integer",
          "description": "Maximum file size",
          "default": 100
        },
        "useCompression": {
          "type": "boolean",
          "description": "Whether to use compression",
          "enum": [true, false],
          "default": false
        },
        "filesInBatch": {
          "type": "integer",
          "description": "Number of files in a batch",
          "default": 30
        },
        "loadingMethod": {
          "type": "string",
          "description": "Method used for loading files",
          "enum": ["BULK_LOADING", "SNOWPIPE_STREAMING"],
          "default": "BULK_LOADING"
        }
      }
    },
    "fileAttributesGeneral-Replication": {
      "type": "object",
      "description": "General file settings",
      "additionalProperties": false,
      "properties": {
        "maxFileSize": {
          "type": "integer",
          "description": "Maximum file size",
          "default": 100
        },
        "useCompression": {
          "type": "boolean",
          "description": "Whether to use compression",
          "enum": [true, false],
          "default": false
        },
        "filesInBatch": {
          "type": "integer",
          "description": "Number of files in a batch",
          "default": 30
        },
        "loadingMethod": {
          "type": "string",
          "description": "Method used for loading files",
          "enum": ["BULK_LOADING", "SNOWPIPE_STREAMING"],
          "default": "BULK_LOADING"
        }
      }
    },
		"fileAttributesGeneral-LakeLanding": {
			"type": "object",
      "description": "General file settings",
      "additionalProperties": false,
			"properties": {
				"format": {
					"type": "string",
					"description": "File format",
					"examples": ["CSV"],
					"enum": ["NONE", "CSV", "JSON", "PARQUET"],
					"default": "CSV"
				},
				"fieldDelimiter": {
					"type": "string",
					"description": "Field delimiter"
				},
				"nullValue": {
					"type": "string",
					"description": "Null value representation"
				},
				"recordDelimiter": {
					"type": "string",
					"description": "Record delimiter"
				},
				"quoteCharacter": {
					"type": "string",
					"description": "Quote character"
				},
				"quoteEscapeCharacter": {
					"type": "string",
					"description": "Quote escape character"
				},
				"maxFileSize": {
					"type": "integer",
					"description": "Maximum file size",
					"default": 1000000
				},
				"parquetMaxLobSize": {
					"type": "integer",
					"description": "Parquet max LOB size",
					"default": 64
				},
				"parquetTimeStampUnit": {
					"type": "string",
					"description": "Parquet timestamp unit"
				},
				"parquetVersion": {
					"type": "string",
					"description": "Parquet version"
				},
				"compressFileUsing": {
					"type": "string",
					"description": "Compression type"
				},
				"addMetadataHeader": {
					"type": "object",
					"description": "Add metadata header settings",
					"properties": {
						"withColumnName": {
							"type": "boolean",
							"description": "Add column name to metadata header",
							"enum": [true, false],
							"default": false
						},
						"withDataTypes": {
							"type": "boolean",
							"description": "Add data types to metadata header",
							"enum": [true, false],
							"default": false
						}
					},
					"additionalProperties": false
				}
			}
		},
    "artifactsInfo": {
      "type": "object",
      "description": "Artifacts information",
      "additionalProperties": false,
      "properties": {
        "liveViews": {
          "$ref": "#/definitions/artifactsInfoLiveViews"
        },
        "headerColumnsPrefix": {
          "type": "string",
          "description": "Prefix for header columns",
          "default": "hdr__"
        },
        "history": {
          "$ref": "#/definitions/artifactsInfoHistory"
        },
        "changeTables": {
          "$ref": "#/definitions/artifactsInfoChangeTables"
        },
        "standardViewsWithHeaders": {
          "$ref": "#/definitions/artifactsInfoStandardViewsWithHeaders"
        },
        "current": {
          "$ref": "#/definitions/artifactsInfoCurrent"
        },
        "prefixForAllTablesAndViews": {
          "type": "string",
          "description": "Prefix for all tables and views"
        }
      }
    },
    "artifactsInfoLiveViews": {
      "type": "object",
      "description": "Live views artifacts configuration",
      "additionalProperties": false,
      "properties": {
        "enabled": {
          "type": "boolean",
          "description": "Enable or disable live views",
          "enum": [true, false],
          "default": true
        },
        "currentSuffix": {
          "type": "string",
          "description": "Suffix for current live views",
          "default": "__live"
        },
        "historySuffix": {
          "type": "string",
          "description": "Suffix for history live views",
          "default": "__live_history"
        }
      }
    },
    "artifactsInfoHistory": {
      "type": "object",
      "description": "History artifacts configuration",
      "additionalProperties": false,
      "properties": {
        "historyViewsSuffix": {
          "type": "string",
          "description": "Suffix for history views",
          "example": "__history"
        },
        "fromDateColumnName": {
          "type": "string",
          "description": "Column name for from date timestamp",
          "example": "hdr__from_timestamp"
        },
        "toDateColumnName": {
          "type": "string",
          "description": "Column name for to date timestamp",
          "example": "hdr__to_timestamp"
        },
        "priorTablesSuffix": {
          "type": "string",
          "description": "Suffix for prior tables",
          "example": "__prior"
        }
      }
    },
    "artifactsInfoChangeTables": {
      "type": "object",
      "description": "Change tables artifacts configuration",
      "additionalProperties": false,
      "properties": {
        "enabled": {
          "type": "boolean",
          "description": "Enable or disable change tables",
          "enum": [true, false],
          "default": false
        },
        "tablesSuffix": {
          "type": "string",
          "description": "Suffix for change tables",
          "example": "__ct"
        },
        "viewsSuffix": {
          "type": "string",
          "description": "Suffix for change views",
          "example": "__changes"
        }
      }
    },
    "artifactsInfoStandardViewsWithHeaders": {
      "type": "object",
      "description": "Standard views with headers configuration",
      "additionalProperties": false,
      "properties": {
        "enabled": {
          "type": "boolean",
          "description": "Enable or disable standard views with headers",
          "enum": [true, false],
          "default": false
        },
        "suffix": {
          "type": "string",
          "description": "Suffix for standard views with headers",
          "example": "__whdr"
        }
      }
    },
    "artifactsInfoCurrent": {
      "type": "object",
      "description": "Current artifacts configuration",
      "additionalProperties": false,
      "properties": {
        "standardViewsSuffix": {
          "type": "string",
          "description": "Suffix for current standard views"
        },
        "currentTablesSuffix": {
          "type": "string",
          "description": "Suffix for current tables",
          "example": "__current"
        }
      }
    },
    "errorHandlingEscalationCount": {
      "type": "object",
      "description": "Escalation count configuration",
      "additionalProperties": false,
      "properties": {
        "isChecked": {
          "type": "boolean",
          "description": "Is escalation count checked",
          "enum": [true, false],
          "default": false
        },
        "value": {
          "type": "integer",
          "description": "Escalation count value",
          "default": 50
        }
      }
    },
    "lobHandling": {
      "type": "object",
      "description": "LOB handling configuration",
      "additionalProperties": false,
      "properties": {
        "lobChunkSize": {
          "type": "integer",
          "description": "Lob chunk size",
          "default": 64
        },
        "optimizeLobSizeEnabled": {
          "type": "boolean",
          "description": "Enable optimization for LOB size",
          "enum": [true, false],
          "default": false
        },
        "optimizeLobSize": {
          "type": "integer",
          "description": "Optimization value for LOB size",
          "default": 1
        },
        "optimizeLobSizeHandlingUnit": {
          "type": "string",
          "description": "Unit for LOB size optimization",
          "enum": ["NONE", "KILOBYTE", "MEGABYTE"],
          "default": "KILOBYTE"
        },
        "lobColumns": {
          "type": "string",
          "description": "LOB columns handling policy",
          "enum": ["NONE", "DO_NOT_REPLICATE_LOB_COLUMN", "REPLICATE_LIMITED_LOB_COLUMN", "REPLICATE_UNLIMITED_LOB_COLUMN"],
          "default": "REPLICATE_LIMITED_LOB_COLUMN"
        },
        "maximumLobSize": {
            "type": "integer",
            "description": "maximumLobSize, for replication tasks only",
            "default": 8
        }
      }
    },
    "jsonHandling": {
      "type": "object",
      "description": "JSON handling configuration",
      "additionalProperties": false,
      "properties": {
        "automaticallyDiscoverJsonColumns": {
          "type": "boolean",
          "description": "Enable automatic discovery of JSON columns",
          "enum": [true, false],
          "default": false
        }
      }
    },
    "controlTableSelection": {
      "type": "array",
      "description": "Control table selection configuration",
      "items": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "tableId": {
            "type": "string",
            "description": "control table ID",
            "enum": ["APPLY_EXCEPTIONS", "REPLICATION_STATUS", "SUSPENDED_TABLES", "REPLICATION_HISTORY", "CHANGE_DATA_PARTITIONS", "DDL_HISTORY"]
          },
          "targetName": {
            "type": "string",
            "description": "Control table target name",
            "enum": ["attrep_apply_exceptions", "attrep_status", "attrep_suspended_tables", "attrep_history", "attrep_cdc_partitions", "attrep_ddl_history"]
          },
          "isChecked": {
            "type": "boolean",
            "description": "Indicates if the control table is checked",
            "enum": [true, false],
            "default": false
          }
        }
      }
    },
    "changeTableHeaderColumn": {
      "type": "array",
      "description": "Header columns for change tables",
      "items": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "string",
            "description": "Header column ID",
            "enum": ["CHANGE_SEQUENCE", "CHANGE_OPERATION", "CHANGE_MASK", "STREAM_POSITION", "OPERATION", "TRANSACTION_ID", "TIMESTAMP", "PARTITION_NAME"]
          },
          "headerColumn": {
            "type": "string",
            "description": "Header column name"
          },
          "isChecked": {
            "type": "boolean",
            "description": "Indiciates whether the column is enabled",
            "enum": [true, false],
            "default": true
          }
        },
        "required": ["id", "headerColumn"]
      }
    },
    "moreOptions": {
      "type": "array",
      "description": "Additional options",
      "items": {
        "type": "object",
        "description": "Additional option item"
      }
    },
    "fullLoadOptionsTuning": {
      "type": "object",
      "description": "Tuning options for full load operations",
      "additionalProperties": false,
      "properties": {
        "maxTables": {
          "type": "integer",
          "description": "Maximum number of tables to process concurrently during full load",
          "default": 5
        },
        "consistencyTimeout": {
          "type": "integer",
          "description": "Timeout in seconds to wait for consistency during full load",
          "default": 600
        },
        "commitRate": {
          "type": "integer",
          "description": "Number of records to process before committing during full load",
          "default": 10000
        }
      }
    },
    "dataProviderType": {
      "type": "string",
      "description": "Data provider type",
      "enum": ["NONE", "EXTERNAL_PROVIDER_1", "EXTERNAL_PROVIDER_2", "REPLICATE", "EXTERNAL_PROVIDER_3"]
    },
    "maximumLobSize": {
      "type": "integer",
      "description": "Maximum LOB size",
      "default": 8
    },
    "includeLobColumns": {
      "type": "boolean",
      "description": "Whether to include LOB columns",
      "enum": [true, false],
      "default": false
    },
    "cdcSettings": {
      "type": "object",
      "description": "CDC settings",
      "additionalProperties": false,
      "properties": {
        "cdcMode": {
          "type": "string",
          "enum": ["PERIODIC", "ONCE"],
          "default": "PERIODIC"
        },
        "sourceCdcFetchIntervalSeconds": {
          "type": "integer",
          "description": "CDC fetch interval in seconds",
          "default": 60
        }
      }
    },
    "initialLoadMode": {
      "type": "string",
      "description": "Initial load mode",
      "enum": ["useCache", "reload"],
      "default": "useCache"
    },
    "tableExistsHandling": {
      "type": "string",
      "description": "Handling for existing tables",
      "enum": ["DROP_AND_CREATE", "TRUNCATE", "IGNORE"],
      "default": "DROP_AND_CREATE"
    },
    "createKeyOrUniqueIndex": {
      "type": "boolean",
      "description": "Create key or unique index after full load",
      "enum": [true, false],
      "default": false
    },
    "landingDwSettings": {
      "type": "object",
      "description": "Landing data warehouse settings",
      "additionalProperties": false,
      "required": ["landingArtifactsLocation"],
      "properties": {
        "landingArtifactsLocation": {
          "type": "object",
          "description": "Location for landing artifacts",
          "additionalProperties": false,
          "required": ["dataAssetSchema"],
          "properties": {
            "dataAssetSchema": {
              "type": "string",
              "description": "Data asset schema reference",
              "example": "{{task.landing3-xnxl.dataAssetSchema}}"
            },
            "database": {
              "type": "string",
              "description": "Database name",
							"example": "{{task.landing3-xnxl.databaseName}}"
            }
          }
        }
      }
    },
    "errorHandlingApplyConflicts": {
      "type": "object",
      "description": "Apply conflicts error handling base",
      "properties": {
        "insertPolicy": {
          "type": "string",
          "description": "Insert policy",
          "enum": ["NONE", "ERROR_POLICY_IGNORE_RECORD", "ERROR_POLICY_MERGE_MODE", "ERROR_POLICY_LOG_ERROR", "ERROR_POLICY_SUSPEND_TABLE", "ERROR_POLICY_STOP_TASK", "ERROR_POLICY_ALLOW_DUPLICATES"],
          "default": "ERROR_POLICY_LOG_ERROR"
        },
        "updatePolicy": {
          "type": "string",
          "description": "Update policy",
          "enum": ["NONE", "ERROR_POLICY_IGNORE_RECORD", "ERROR_POLICY_UPSERT_MODE", "ERROR_POLICY_LOG_ERROR", "ERROR_POLICY_SUSPEND_TABLE", "ERROR_POLICY_STOP_TASK"],
          "default": "ERROR_POLICY_LOG_ERROR"
        },
        "deletePolicy": {
          "type": "string",
          "description": "Delete policy",
          "enum": ["NONE", "ERROR_POLICY_IGNORE_RECORD", "ERROR_POLICY_LOG_ERROR", "ERROR_POLICY_SUSPEND_TABLE", "ERROR_POLICY_STOP_TASK"],
          "default": "ERROR_POLICY_IGNORE_RECORD"
        },
        "escalationPolicy": {
          "type": "string",
          "description": "Escalation policy",
          "enum": ["NONE", "ERROR_POLICY_LOG_ERROR", "ERROR_POLICY_SUSPEND_TABLE", "ERROR_POLICY_STOP_TASK"],
          "default": "ERROR_POLICY_LOG_ERROR"
        },
        "escalationCount": {
            "$ref": "#/definitions/errorHandlingEscalationCount"
        }
      }
    },
    "errorHandlingData": {
      "type": "object",
      "description": "Data error handling",
      "additionalProperties": false,
      "properties": {
        "truncationPolicyErrors": {
          "type": "string",
          "description": "Truncation policy errors",
          "enum": ["NONE", "ERROR_POLICY_IGNORE_RECORD", "ERROR_POLICY_LOG_ERROR", "ERROR_POLICY_SUSPEND_TABLE", "ERROR_POLICY_STOP_TASK"],
          "default": "ERROR_POLICY_LOG_ERROR"
        },
        "policyErrors": {
          "type": "string",
          "description": "Policy errors",
          "enum": ["NONE", "ERROR_POLICY_IGNORE_RECORD", "ERROR_POLICY_LOG_ERROR", "ERROR_POLICY_SUSPEND_TABLE", "ERROR_POLICY_STOP_TASK"],
          "default": "ERROR_POLICY_LOG_ERROR"
        },
        "escalationPolicy": {
          "type": "string",
          "description": "Escalation policy",
          "enum": ["NONE", "ERROR_POLICY_SUSPEND_TABLE", "ERROR_POLICY_STOP_TASK", "ERROR_POLICY_LOG_ERROR"],
          "default": "ERROR_POLICY_SUSPEND_TABLE"
        },
        "escalationCount": {
          "$ref": "#/definitions/errorHandlingEscalationCount"
        }
      }
    },
    "errorHandlingTableError": {
      "type": "object",
      "description": "Table error handling",
      "additionalProperties": false,
      "properties": {
        "policyErrors": {
          "type": "string",
          "description": "Policy errors",
          "enum": ["NONE", "ERROR_POLICY_SUSPEND_TABLE", "ERROR_POLICY_STOP_TASK"],
          "default": "ERROR_POLICY_SUSPEND_TABLE"
        },
        "escalationPolicy": {
          "type": "string",
          "description": "Escalation policy",
          "enum": ["NONE", "ERROR_POLICY_LOG_ERROR", "ERROR_POLICY_SUSPEND_TABLE", "ERROR_POLICY_STOP_TASK"],
          "default": "ERROR_POLICY_STOP_TASK"
        },
        "escalationCount": {
          "$ref": "#/definitions/errorHandlingEscalationCount"
        },
        "retryCount": {
          "type": "integer",
          "description": "Retry count",
          "default": 3
        }
      }
    },
    "errorHandlingEnvironmental": {
      "type": "object",
      "description": "Environmental error handling",
      "properties": {
        "interval": {
          "type": "integer",
          "description": "Environmental interval",
          "default": 5
        },
        "maximumRetryCount": {
          "type": "object",
          "description": "Maximum retry count",
          "additionalProperties": false,
          "properties": {
            "isChecked": {
              "type": "boolean",
              "description": "Is maximum retry count checked",
              "enum": [true, false],
              "default": true
            },
            "value": {
              "type": "integer",
              "description": "Maximum retry count value",
              "default": -1
            }
          }
        },
        "maximumRetrySettings": {
          "type": "object",
          "description": "Maximum retry settings",
          "additionalProperties": false,
          "properties": {
            "maximumRetry": {
              "type": "string",
              "description": "Maximum retry",
              "enum": ["NONE", "ALWAYS", "CUSTOM"],
              "default": "ALWAYS"
            },
            "count": {
              "type": "integer",
              "description": "Maximum retry count",
              "default": 0
            }
          }
        },
        "maximumRetryInterval": {
          "type": "object",
          "description": "Maximum retry interval",
          "additionalProperties": false,
          "properties": {
            "isChecked": {
              "type": "boolean",
              "description": "Is maximum retry interval checked",
              "enum": [true, false],
              "default": true
            },
            "value": {
              "type": "integer",
              "description": "Maximum retry interval value",
              "default": 1800
            }
          }
        }
      },
      "additionalProperties": false
    },
    "stopTask": {
      "type": "object",
      "description": "Stop task options",
      "additionalProperties": false,
      "properties": {
        "beforeCachedChanges": {
          "type": "boolean",
          "description": "Stop before cached changes",
          "enum": [true, false],
          "default": false
        },
        "afterCachedChanges": {
          "type": "boolean",
          "description": "Stop after cached changes",
          "enum": [true, false],
          "default": false
        }
      }
    },
    "vectorDbTargetType": {
      "type": "string",
      "description": "Target type for vector database"
    },
    "vectorDbConnection": {
      "type": "string",
      "description": "Vector database connection string"
    },
    "llmConnection": {
      "type": "string",
      "description": "LLM connection string"
    },
    "llmSettings": {
      "type": "object",
      "description": "LLM configuration settings",
      "additionalProperties": false,
      "properties": {
        "kindId": {
          "type": "string",
          "description": "LLM kind identifier",
          "example": "llm:SnowflakeCortex@1.0.0"
        },
        "parameters": {
          "type": "object",
          "description": "LLM parameters",
          "additionalProperties": false,
          "properties": {
            "embedding_model": {
              "type": "string",
              "description": "Embedding model name",
              "example": "nv-embed-qa-4"
            },
            "completion_model": {
              "type": "string",
              "description": "Completion model name",
              "example": "mistral-7b"
            }
          }
        }
      }
    },
    "indexArtifactsLocation": {
      "type": "object",
      "description": "Location for index artifacts",
      "additionalProperties": false,
      "properties": {
        "schema": {
          "type": "string",
          "description": "Schema"
        },
        "name": {
          "type": "string",
          "description": "Name"
        },
        "database": {
          "type": "string",
          "description": "Database"
        },
        "databricksVectorSearchEndpoint": {
          "type": "string",
          "description": "Databricks vector search endpoint URL"
        }
      }
    },
    "loadViewsSuffix": {
      "type": "string",
      "description": "Suffix appended to load views for published documents",
      "default": "__publish_doc_view"
    },
    "cdcViewsSuffix": {
      "type": "string",
      "description": "Suffix appended to CDC views for published documents",
      "default": "__publish_doc_cdc_view"
    },
    "outputDirectory": {
      "type": "string",
      "description": "Directory path for output files"
    },
    "indexActionOnPrepare-RECREATE": {
      "type": "string",
      "description": "Action to take on index during prepare phase",
      "enum": ["CREATE_IF_NOT_EXISTS", "RECREATE"],
      "default": "RECREATE"
    },
    "indexActionOnPrepare-CREATE_IF_NOT_EXISTS": {
      "type": "string",
      "description": "Action to take on index during prepare phase",
      "enum": ["CREATE_IF_NOT_EXISTS", "RECREATE"],
      "default": "CREATE_IF_NOT_EXISTS"
    },
    "testAssistantSettings": {
      "type": "object",
      "description": "Configuration settings for testing the AI assistant",
      "additionalProperties": false,
      "properties": {
        "numberOfDocumentsRetrieved": {
          "type": "integer",
          "description": "Number of documents to retrieve for context",
          "minimum": 1,
          "maximum": 100,
          "default": 2
        },
        "userPromptTemplate": {
          "type": "string",
          "description": "Template for user prompts with placeholders for {context} and {question}",
          "default": "Use the given context to answer the question. If you don't know the answer, say you don't know. Use three sentences maximum and keep the answer concise. \nContext: {context}.\n\nQuestion: {question}\nHelpful Answer:"
        },
        "filterConditions": {
          "type": "string",
          "description": "JSON string containing filter conditions for document retrieval",
          "example": "{ \u0027range\u0027: { \u0027metadata.UnitsInStock\u0027: { \u0027gt\u0027: 39 } } } "
        },
        "documentRetrieval": {
          "type": "string",
          "description": "Setting to enable or disable document retrieval",
          "enum": ["NONE", "DOCUMENT_RETRIEVAL_ENABLED", "DOCUMENT_RETRIEVAL_DISABLED"],
          "default": "DOCUMENT_RETRIEVAL_ENABLED"
        },
        "answerGeneration": {
          "type": "string",
          "description": "Setting to enable or disable answer generation",
          "enum": ["NONE", "ANSWER_GENERATION_ENABLED", "ANSWER_GENERATION_DISABLED"],
          "default": "ANSWER_GENERATION_ENABLED"
        },
        "searchFunction": {
          "type": "string",
          "description": "Custom search function configuration"
        }
      }
    },
    "workloadExecutionEngine": {
      "type": "object",
      "description": "Workload execution engine configuration",
      "additionalProperties": false,
      "properties": {
        "engineType": {
          "type": "string",
          "description": "Workload execution engine type",
          "enum": ["DEFAULT"],
          "default": "DEFAULT"
        },
        "name": {
          "type": "string",
          "description": "Workload execution engine name",
          "example": "RND_WH"
        }
      }
    }
  }
}
