{ "$schema": "http://json-schema.org/draft-07/schema#", "$id": "https://raw.githubusercontent.com/qlik-oss/schemas/refs/heads/main/qtcp/task.model.schema.json", "title": "Task Model Configuration", "description": "Schema for task model configuration", "type": "object", "required": ["relationships"], "properties": { "modifiedByAi": { "$ref": "#/$defs/ModifiedByAi" }, "relationships": { "type": "array", "description": "Relationships array", "items": { "type": "object", "required": ["sourceEntity","targetEntity","columnRelationships"], "properties": { "id": { "type": "string", "description": "Model unique identifier, to be used in datamart task" }, "name": { "type": "string", "description": "Model Display name", "examples": ["Orders_OrderLines"] }, "shortName": { "type": "string", "description": "Short alias for the relationship" }, "description": { "type": "string", "description": "Model description" }, "sourceEntity": { "type": "object", "description": "Source entity in the model", "required": ["datasetId"], "properties": { "type": { "type": "string", "description": "Type", "enum": ["NONE","TABLE","VIEW","TABLE_AND_VIEW","DIRECTORY"], "default": "NONE" }, "name": { "type": "string", "description": "Display name of the source dataset", "examples": ["Categories"] }, "projectId": { "type": "string", "description": "Project identifier containing the source dataset. Can use template reference syntax", "examples": ["{{ref(project.current.projectId)}}", "my-project-id"] }, "taskId": { "type": "string", "description": "Task identifier containing the source dataset", "examples": ["transform1-sfim"] }, "datasetId": { "type": "string", "description": "Unique identifier of the source dataset", "examples": ["categories-ch_e"] } }, "additionalProperties": false }, "targetEntity": { "type": "object", "description": "Target entity in the model", "required": ["datasetId"], "properties": { "type": { "type": "string", "description": "Type", "enum": ["NONE","TABLE","VIEW","TABLE_AND_VIEW","DIRECTORY"], "default": "NONE" }, "name": { "type": "string", "description": "Display name of the target dataset", "examples": ["Categories"] }, "projectId": { "type": "string", "description": "Project identifier containing the target dataset. Can use template reference syntax", "examples": ["{{ref(project.current.projectId)}}", "my-project-id"] }, "taskId": { "type": "string", "description": "Task identifier containing the target dataset", "examples": ["transform1-sfim"] }, "datasetId": { "type": "string", "description": "Unique identifier of the target dataset", "examples": ["categories-ch_e"] } }, "additionalProperties": false }, "columnRelationships": { "type": "array", "description": "Array of column-to-column relationships defining how the entities are related", "items": { "type": "object", "description": "A single column relationship mapping", "required": ["sourceColumn", "targetColumn", "sourceColumnId", "targetColumnId"], "properties": { "sourceColumn": { "type": "string", "description": "Display name of the column in the source entity", "examples": ["CategoryID"] }, "targetColumn": { "type": "string", "description": "Display name of the column in the target entity", "examples": ["CategoryID"] }, "sourceColumnId": { "type": "string", "description": "Internal identifier of the source column (typically lowercase)", "examples": ["categoryid"] }, "targetColumnId": { "type": "string", "description": "Internal identifier of the target column (typically lowercase)", "examples": ["categoryid"] } }, "additionalProperties": false } } }, "additionalProperties": false } } }, "$defs": { "ModifiedByAi": { "type": "object", "description": "Metadata describing the latest AI modification", "required": ["lastUpdated", "model"], "properties": { "lastUpdated": { "type": "string", "format": "date-time", "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$", "description": "UTC timestamp of the latest AI modification" }, "model": { "type": "string", "minLength": 1, "description": "AI model that made the latest modification" } }, "additionalProperties": false } }, "additionalProperties": false }