{ "openapi": "3.1.0", "info": { "title": "FastAPI", "version": "0.1.0" }, "paths": { "/api/commands/apply": { "post": { "summary": "Initiate Apply", "description": "Apply a plan", "operationId": "initiate_apply_api_commands_apply_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Body_initiate_apply_api_commands_apply_post" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "anyOf": [ { "$ref": "#/components/schemas/PlanApplyStageTracker" }, { "type": "null" } ], "title": "Response Initiate Apply Api Commands Apply Post" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/commands/evaluate": { "post": { "summary": "Evaluate", "description": "Evaluate a model with a default limit of 1000", "operationId": "evaluate_api_commands_evaluate_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EvaluateInput" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/commands/fetchdf": { "post": { "summary": "Fetchdf", "description": "Fetches a dataframe given a sql string", "operationId": "fetchdf_api_commands_fetchdf_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FetchdfInput" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/commands/render": { "post": { "summary": "Render", "description": "Renders a model's query, optionally expanding referenced models", "operationId": "render_api_commands_render_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RenderInput" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Query" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/commands/test": { "get": { "summary": "Test", "description": "Run one or all model tests", "operationId": "test_api_commands_test_get", "parameters": [ { "name": "test", "in": "query", "required": false, "schema": { "anyOf": [{ "type": "string" }, { "type": "null" }], "title": "Test" } }, { "name": "verbosity", "in": "query", "required": false, "schema": { "$ref": "#/components/schemas/Verbosity", "default": 0 } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TestResult" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/files": { "get": { "summary": "Get Files", "description": "Get all project files.", "operationId": "get_files_api_files_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Directory" } } } } } } }, "/api/files/{path}": { "get": { "summary": "Get File", "description": "Get a file, including its contents.", "operationId": "get_file_api_files__path__get", "parameters": [ { "name": "path", "in": "path", "required": true, "schema": { "type": "string", "title": "Path" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/File" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "post": { "summary": "Write File", "description": "Create, update, or rename a file.", "operationId": "write_file_api_files__path__post", "parameters": [ { "name": "path", "in": "path", "required": true, "schema": { "type": "string", "title": "Path" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Body_write_file_api_files__path__post" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "anyOf": [ { "$ref": "#/components/schemas/File" }, { "type": "null" } ], "title": "Response Write File Api Files Path Post" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "delete": { "summary": "Delete File", "description": "Delete a file.", "operationId": "delete_file_api_files__path__delete", "parameters": [ { "name": "path", "in": "path", "required": true, "schema": { "type": "string", "title": "Path" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "null", "title": "Response Delete File Api Files Path Delete" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/directories/{path}": { "post": { "summary": "Write Directory", "description": "Create or rename a directory.", "operationId": "write_directory_api_directories__path__post", "parameters": [ { "name": "path", "in": "path", "required": true, "schema": { "type": "string", "title": "Path" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Body_write_directory_api_directories__path__post" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Directory" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "delete": { "summary": "Delete Directory", "description": "Delete a directory.", "operationId": "delete_directory_api_directories__path__delete", "parameters": [ { "name": "path", "in": "path", "required": true, "schema": { "type": "string", "title": "Path" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/plan": { "post": { "summary": "Initiate Plan", "description": "Get a plan for an environment.", "operationId": "initiate_plan_api_plan_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Body_initiate_plan_api_plan_post" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "anyOf": [ { "$ref": "#/components/schemas/PlanOverviewStageTracker" }, { "type": "null" } ], "title": "Response Initiate Plan Api Plan Post" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/plan/cancel": { "post": { "summary": "Cancel Plan", "description": "Cancel a plan application", "operationId": "cancel_plan_api_plan_cancel_post", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "anyOf": [ { "$ref": "#/components/schemas/PlanCancelStageTracker" }, { "type": "null" } ], "title": "Response Cancel Plan Api Plan Cancel Post" } } } } } } }, "/api/environments": { "get": { "summary": "Get Environments", "description": "Get the environments", "operationId": "get_environments_api_environments_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Environments" } } } } } } }, "/api/environments/{environment}": { "delete": { "summary": "Delete Environment", "description": "Invalidate and delete an environment", "operationId": "delete_environment_api_environments__environment__delete", "parameters": [ { "name": "environment", "in": "path", "required": true, "schema": { "type": "string", "title": "Environment" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/events": { "get": { "summary": "Events", "description": "SQLMesh console server sent events", "operationId": "events_api_events_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } } } }, "/api/lineage/{model_name}/{column_name}": { "get": { "summary": "Column Lineage", "description": "Get a column's lineage", "operationId": "column_lineage_api_lineage__model_name___column_name__get", "parameters": [ { "name": "model_name", "in": "path", "required": true, "schema": { "type": "string", "title": "Model Name" } }, { "name": "column_name", "in": "path", "required": true, "schema": { "type": "string", "title": "Column Name" } }, { "name": "models_only", "in": "query", "required": false, "schema": { "type": "boolean", "default": false, "title": "Models Only" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": { "type": "object", "additionalProperties": { "$ref": "#/components/schemas/LineageColumn" } }, "title": "Response Column Lineage Api Lineage Model Name Column Name Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/lineage/{model_name}": { "get": { "summary": "Model Lineage", "description": "Get a model's lineage", "operationId": "model_lineage_api_lineage__model_name__get", "parameters": [ { "name": "model_name", "in": "path", "required": true, "schema": { "type": "string", "title": "Model Name" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": { "type": "array", "uniqueItems": true, "items": { "type": "string" } }, "title": "Response Model Lineage Api Lineage Model Name Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/models": { "get": { "summary": "Get Models", "description": "Get a list of models", "operationId": "get_models_api_models_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "anyOf": [ { "items": { "$ref": "#/components/schemas/Model" }, "type": "array" }, { "$ref": "#/components/schemas/ApiExceptionPayload" } ], "title": "Response Get Models Api Models Get" } } } } } } }, "/api/models/{name}": { "get": { "summary": "Get Model", "description": "Get a single model", "operationId": "get_model_api_models__name__get", "parameters": [ { "name": "name", "in": "path", "required": true, "schema": { "type": "string", "title": "Name" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Model" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/meta": { "get": { "summary": "Get Api Meta", "description": "Get the metadata", "operationId": "get_api_meta_api_meta_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Meta" } } } } } } }, "/api/modules": { "get": { "summary": "Get Api Modules", "description": "Get the modules", "operationId": "get_api_modules_api_modules_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "items": { "$ref": "#/components/schemas/Modules" }, "type": "array", "title": "Response Get Api Modules Api Modules Get" } } } } } } }, "/api/table_diff": { "get": { "summary": "Get Table Diff", "description": "Calculate differences between tables, taking into account schema and row level differences.", "operationId": "get_table_diff_api_table_diff_get", "parameters": [ { "name": "source", "in": "query", "required": true, "schema": { "type": "string", "title": "Source" } }, { "name": "target", "in": "query", "required": true, "schema": { "type": "string", "title": "Target" } }, { "name": "on", "in": "query", "required": false, "schema": { "anyOf": [{ "type": "string" }, { "type": "null" }], "title": "On" } }, { "name": "model_or_snapshot", "in": "query", "required": false, "schema": { "anyOf": [{ "type": "string" }, { "type": "null" }], "title": "Model Or Snapshot" } }, { "name": "where", "in": "query", "required": false, "schema": { "anyOf": [{ "type": "string" }, { "type": "null" }], "title": "Where" } }, { "name": "temp_schema", "in": "query", "required": false, "schema": { "anyOf": [{ "type": "string" }, { "type": "null" }], "title": "Temp Schema" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "default": 20, "title": "Limit" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "anyOf": [ { "$ref": "#/components/schemas/TableDiff" }, { "type": "null" } ], "title": "Response Get Table Diff Api Table Diff Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/health": { "get": { "summary": "Health", "operationId": "health_health_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "string", "title": "Response Health Health Get" } } } } } } }, "/{full_path}": { "get": { "summary": "Index", "operationId": "index__full_path__get", "parameters": [ { "name": "full_path", "in": "path", "required": true, "schema": { "type": "string", "title": "Full Path" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } } }, "components": { "schemas": { "ApiExceptionPayload": { "properties": { "timestamp": { "type": "integer", "title": "Timestamp" }, "message": { "type": "string", "title": "Message" }, "origin": { "type": "string", "title": "Origin" }, "status": { "anyOf": [{ "type": "integer" }, { "type": "null" }], "title": "Status" }, "trigger": { "anyOf": [{ "type": "string" }, { "type": "null" }], "title": "Trigger" }, "type": { "anyOf": [{ "type": "string" }, { "type": "null" }], "title": "Type" }, "description": { "anyOf": [{ "type": "string" }, { "type": "null" }], "title": "Description" }, "traceback": { "anyOf": [{ "type": "string" }, { "type": "null" }], "title": "Traceback" }, "stack": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Stack" } }, "additionalProperties": false, "type": "object", "required": ["timestamp", "message", "origin"], "title": "ApiExceptionPayload" }, "BackfillDetails": { "properties": { "name": { "type": "string", "title": "Name" }, "view_name": { "type": "string", "title": "View Name" }, "node_type": { "$ref": "#/components/schemas/NodeType", "default": "model" }, "parents": { "items": { "type": "string" }, "type": "array", "uniqueItems": true, "title": "Parents", "default": [] }, "interval": { "items": { "type": "string" }, "type": "array", "title": "Interval" }, "batches": { "type": "integer", "title": "Batches" } }, "additionalProperties": false, "type": "object", "required": ["name", "view_name", "interval", "batches"], "title": "BackfillDetails" }, "BackfillTask": { "properties": { "name": { "type": "string", "title": "Name" }, "view_name": { "type": "string", "title": "View Name" }, "node_type": { "$ref": "#/components/schemas/NodeType", "default": "model" }, "parents": { "items": { "type": "string" }, "type": "array", "uniqueItems": true, "title": "Parents", "default": [] }, "completed": { "type": "integer", "title": "Completed" }, "total": { "type": "integer", "title": "Total" }, "start": { "type": "integer", "title": "Start" }, "end": { "anyOf": [{ "type": "integer" }, { "type": "null" }], "title": "End" }, "interval": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Interval" } }, "additionalProperties": false, "type": "object", "required": ["name", "view_name", "completed", "total", "start"], "title": "BackfillTask" }, "Body_initiate_apply_api_commands_apply_post": { "properties": { "environment": { "anyOf": [{ "type": "string" }, { "type": "null" }], "title": "Environment" }, "plan_dates": { "anyOf": [ { "$ref": "#/components/schemas/PlanDates" }, { "type": "null" } ] }, "plan_options": { "anyOf": [ { "$ref": "#/components/schemas/PlanOptions" }, { "type": "null" } ] }, "categories": { "anyOf": [ { "additionalProperties": { "$ref": "#/components/schemas/SnapshotChangeCategory" }, "type": "object" }, { "type": "null" } ], "title": "Categories" } }, "type": "object", "title": "Body_initiate_apply_api_commands_apply_post" }, "Body_initiate_plan_api_plan_post": { "properties": { "environment": { "anyOf": [{ "type": "string" }, { "type": "null" }], "title": "Environment" }, "plan_dates": { "anyOf": [ { "$ref": "#/components/schemas/PlanDates" }, { "type": "null" } ] }, "plan_options": { "anyOf": [ { "$ref": "#/components/schemas/PlanOptions" }, { "type": "null" } ] }, "categories": { "anyOf": [ { "additionalProperties": { "$ref": "#/components/schemas/SnapshotChangeCategory" }, "type": "object" }, { "type": "null" } ], "title": "Categories" } }, "type": "object", "title": "Body_initiate_plan_api_plan_post" }, "Body_write_directory_api_directories__path__post": { "properties": { "new_path": { "anyOf": [{ "type": "string" }, { "type": "null" }], "title": "New Path" } }, "type": "object", "title": "Body_write_directory_api_directories__path__post" }, "Body_write_file_api_files__path__post": { "properties": { "content": { "type": "string", "title": "Content", "default": "" }, "new_path": { "anyOf": [{ "type": "string" }, { "type": "null" }], "title": "New Path" } }, "type": "object", "title": "Body_write_file_api_files__path__post" }, "ChangeDirect": { "properties": { "name": { "type": "string", "title": "Name" }, "view_name": { "type": "string", "title": "View Name" }, "node_type": { "$ref": "#/components/schemas/NodeType", "default": "model" }, "parents": { "items": { "type": "string" }, "type": "array", "uniqueItems": true, "title": "Parents", "default": [] }, "diff": { "type": "string", "title": "Diff" }, "indirect": { "items": { "$ref": "#/components/schemas/ChangeDisplay" }, "type": "array", "title": "Indirect", "default": [] }, "direct": { "items": { "$ref": "#/components/schemas/ChangeDisplay" }, "type": "array", "title": "Direct", "default": [] }, "change_category": { "anyOf": [ { "$ref": "#/components/schemas/SnapshotChangeCategory" }, { "type": "null" } ] } }, "additionalProperties": false, "type": "object", "required": ["name", "view_name", "diff"], "title": "ChangeDirect" }, "ChangeDisplay": { "properties": { "name": { "type": "string", "title": "Name" }, "view_name": { "type": "string", "title": "View Name" }, "node_type": { "$ref": "#/components/schemas/NodeType", "default": "model" }, "parents": { "items": { "type": "string" }, "type": "array", "uniqueItems": true, "title": "Parents", "default": [] } }, "additionalProperties": false, "type": "object", "required": ["name", "view_name"], "title": "ChangeDisplay" }, "ChangeIndirect": { "properties": { "name": { "type": "string", "title": "Name" }, "view_name": { "type": "string", "title": "View Name" }, "node_type": { "$ref": "#/components/schemas/NodeType", "default": "model" }, "parents": { "items": { "type": "string" }, "type": "array", "uniqueItems": true, "title": "Parents", "default": [] } }, "additionalProperties": false, "type": "object", "required": ["name", "view_name"], "title": "ChangeIndirect" }, "Column": { "properties": { "name": { "type": "string", "title": "Name" }, "type": { "type": "string", "title": "Type" }, "description": { "anyOf": [{ "type": "string" }, { "type": "null" }], "title": "Description" } }, "additionalProperties": false, "type": "object", "required": ["name", "type"], "title": "Column" }, "Directory": { "properties": { "name": { "type": "string", "title": "Name" }, "path": { "type": "string", "title": "Path" }, "directories": { "items": { "$ref": "#/components/schemas/Directory" }, "type": "array", "title": "Directories", "default": [] }, "files": { "items": { "$ref": "#/components/schemas/File" }, "type": "array", "title": "Files", "default": [] } }, "additionalProperties": false, "type": "object", "required": ["name", "path"], "title": "Directory" }, "Environment": { "properties": { "name": { "type": "string", "title": "Name", "default": "prod" }, "start_at": { "anyOf": [ { "type": "string", "format": "date" }, { "type": "string", "format": "date-time" }, { "type": "string" }, { "type": "integer" }, { "type": "number" } ], "title": "Start At" }, "end_at": { "anyOf": [ { "type": "string", "format": "date" }, { "type": "string", "format": "date-time" }, { "type": "string" }, { "type": "integer" }, { "type": "number" }, { "type": "null" } ], "title": "End At" }, "plan_id": { "type": "string", "title": "Plan Id" }, "previous_plan_id": { "anyOf": [{ "type": "string" }, { "type": "null" }], "title": "Previous Plan Id" }, "expiration_ts": { "anyOf": [{ "type": "integer" }, { "type": "null" }], "title": "Expiration Ts" }, "finalized_ts": { "anyOf": [{ "type": "integer" }, { "type": "null" }], "title": "Finalized Ts" }, "suffix_target": { "$ref": "#/components/schemas/EnvironmentSuffixTarget", "default": "schema" }, "catalog_name_override": { "anyOf": [{ "type": "string" }, { "type": "null" }], "title": "Catalog Name Override" }, "normalize_name": { "type": "boolean", "title": "Normalize Name", "default": true }, "gateway_managed": { "type": "boolean", "title": "Gateway Managed", "default": false }, "snapshots": { "items": {}, "type": "array", "title": "Snapshots" }, "promoted_snapshot_ids": { "anyOf": [{ "items": {}, "type": "array" }, { "type": "null" }], "title": "Promoted Snapshot Ids" }, "previous_finalized_snapshots": { "anyOf": [{ "items": {}, "type": "array" }, { "type": "null" }], "title": "Previous Finalized Snapshots" }, "requirements": { "additionalProperties": { "type": "string" }, "type": "object", "title": "Requirements", "default": {} } }, "additionalProperties": false, "type": "object", "required": ["start_at", "plan_id", "snapshots"], "title": "Environment", "description": "Represents an isolated environment.\n\nEnvironments are isolated workspaces that hold pointers to physical tables.\n\nArgs:\n snapshots: The snapshots that are part of this environment.\n promoted_snapshot_ids: The IDs of the snapshots that are promoted in this environment\n (i.e. for which the views are created). If not specified, all snapshots are promoted.\n previous_finalized_snapshots: Snapshots that were part of this environment last time it was finalized.\n requirements: A mapping of library versions for all the snapshots in this environment." }, "EnvironmentSuffixTarget": { "type": "string", "enum": ["schema", "table"], "title": "EnvironmentSuffixTarget" }, "Environments": { "properties": { "environments": { "additionalProperties": { "$ref": "#/components/schemas/Environment" }, "type": "object", "title": "Environments", "default": {} }, "pinned_environments": { "items": { "type": "string" }, "type": "array", "uniqueItems": true, "title": "Pinned Environments", "default": [] }, "default_target_environment": { "type": "string", "title": "Default Target Environment", "default": "" } }, "additionalProperties": false, "type": "object", "title": "Environments" }, "EvaluateInput": { "properties": { "model": { "type": "string", "title": "Model" }, "start": { "anyOf": [ { "type": "string", "format": "date" }, { "type": "string", "format": "date-time" }, { "type": "string" }, { "type": "integer" }, { "type": "number" } ], "title": "Start" }, "end": { "anyOf": [ { "type": "string", "format": "date" }, { "type": "string", "format": "date-time" }, { "type": "string" }, { "type": "integer" }, { "type": "number" } ], "title": "End" }, "execution_time": { "anyOf": [ { "type": "string", "format": "date" }, { "type": "string", "format": "date-time" }, { "type": "string" }, { "type": "integer" }, { "type": "number" } ], "title": "Execution Time" }, "limit": { "type": "integer", "title": "Limit", "default": 1000 } }, "additionalProperties": false, "type": "object", "required": ["model", "start", "end", "execution_time"], "title": "EvaluateInput" }, "FetchdfInput": { "properties": { "sql": { "type": "string", "title": "Sql" }, "limit": { "type": "integer", "title": "Limit", "default": 1000 } }, "additionalProperties": false, "type": "object", "required": ["sql"], "title": "FetchdfInput" }, "File": { "properties": { "name": { "type": "string", "title": "Name" }, "path": { "type": "string", "title": "Path" }, "extension": { "type": "string", "title": "Extension", "default": "" }, "content": { "anyOf": [{ "type": "string" }, { "type": "null" }], "title": "Content" } }, "additionalProperties": false, "type": "object", "required": ["name", "path"], "title": "File" }, "HTTPValidationError": { "properties": { "detail": { "items": { "$ref": "#/components/schemas/ValidationError" }, "type": "array", "title": "Detail" } }, "type": "object", "title": "HTTPValidationError" }, "IntervalUnit": { "type": "string", "enum": [ "year", "month", "day", "hour", "half_hour", "quarter_hour", "five_minute" ], "title": "IntervalUnit", "description": "IntervalUnit is the inferred granularity of an incremental node.\n\nIntervalUnit can be one of 5 types, YEAR, MONTH, DAY, HOUR, MINUTE. The unit is inferred\nbased on the cron schedule of a node. The minimum time delta between a sample set of dates\nis used to determine which unit a node's schedule is." }, "LineageColumn": { "properties": { "source": { "anyOf": [{ "type": "string" }, { "type": "null" }], "title": "Source" }, "expression": { "anyOf": [{ "type": "string" }, { "type": "null" }], "title": "Expression" }, "models": { "additionalProperties": { "items": { "type": "string" }, "type": "array", "uniqueItems": true }, "type": "object", "title": "Models" } }, "additionalProperties": false, "type": "object", "required": ["models"], "title": "LineageColumn" }, "Meta": { "properties": { "version": { "type": "string", "title": "Version" }, "has_running_task": { "type": "boolean", "title": "Has Running Task", "default": false } }, "additionalProperties": false, "type": "object", "required": ["version"], "title": "Meta" }, "Model": { "properties": { "name": { "type": "string", "title": "Name" }, "fqn": { "type": "string", "title": "Fqn" }, "path": { "anyOf": [{ "type": "string" }, { "type": "null" }], "title": "Path" }, "full_path": { "anyOf": [{ "type": "string" }, { "type": "null" }], "title": "Full Path" }, "dialect": { "type": "string", "title": "Dialect" }, "type": { "$ref": "#/components/schemas/ModelType" }, "columns": { "items": { "$ref": "#/components/schemas/Column" }, "type": "array", "title": "Columns" }, "description": { "anyOf": [{ "type": "string" }, { "type": "null" }], "title": "Description" }, "details": { "anyOf": [ { "$ref": "#/components/schemas/ModelDetails" }, { "type": "null" } ] }, "sql": { "anyOf": [{ "type": "string" }, { "type": "null" }], "title": "Sql" }, "definition": { "anyOf": [{ "type": "string" }, { "type": "null" }], "title": "Definition" }, "default_catalog": { "anyOf": [{ "type": "string" }, { "type": "null" }], "title": "Default Catalog" }, "hash": { "type": "string", "title": "Hash" } }, "additionalProperties": false, "type": "object", "required": ["name", "fqn", "dialect", "type", "columns", "hash"], "title": "Model" }, "ModelDetails": { "properties": { "owner": { "anyOf": [{ "type": "string" }, { "type": "null" }], "title": "Owner" }, "kind": { "anyOf": [{ "type": "string" }, { "type": "null" }], "title": "Kind" }, "batch_size": { "anyOf": [{ "type": "integer" }, { "type": "null" }], "title": "Batch Size" }, "cron": { "anyOf": [{ "type": "string" }, { "type": "null" }], "title": "Cron" }, "stamp": { "anyOf": [ { "type": "string", "format": "date" }, { "type": "string", "format": "date-time" }, { "type": "string" }, { "type": "integer" }, { "type": "number" }, { "type": "null" } ], "title": "Stamp" }, "start": { "anyOf": [ { "type": "string", "format": "date" }, { "type": "string", "format": "date-time" }, { "type": "string" }, { "type": "integer" }, { "type": "number" }, { "type": "null" } ], "title": "Start" }, "retention": { "anyOf": [{ "type": "integer" }, { "type": "null" }], "title": "Retention" }, "table_format": { "anyOf": [{ "type": "string" }, { "type": "null" }], "title": "Table Format" }, "storage_format": { "anyOf": [{ "type": "string" }, { "type": "null" }], "title": "Storage Format" }, "time_column": { "anyOf": [{ "type": "string" }, { "type": "null" }], "title": "Time Column" }, "tags": { "anyOf": [{ "type": "string" }, { "type": "null" }], "title": "Tags" }, "references": { "items": { "$ref": "#/components/schemas/Reference" }, "type": "array", "title": "References", "default": [] }, "partitioned_by": { "anyOf": [{ "type": "string" }, { "type": "null" }], "title": "Partitioned By" }, "clustered_by": { "anyOf": [{ "type": "string" }, { "type": "null" }], "title": "Clustered By" }, "lookback": { "anyOf": [{ "type": "integer" }, { "type": "null" }], "title": "Lookback" }, "cron_prev": { "anyOf": [ { "type": "string", "format": "date" }, { "type": "string", "format": "date-time" }, { "type": "string" }, { "type": "integer" }, { "type": "number" }, { "type": "null" } ], "title": "Cron Prev" }, "cron_next": { "anyOf": [ { "type": "string", "format": "date" }, { "type": "string", "format": "date-time" }, { "type": "string" }, { "type": "integer" }, { "type": "number" }, { "type": "null" } ], "title": "Cron Next" }, "interval_unit": { "anyOf": [ { "$ref": "#/components/schemas/IntervalUnit" }, { "type": "null" } ] }, "annotated": { "anyOf": [{ "type": "boolean" }, { "type": "null" }], "title": "Annotated" } }, "additionalProperties": false, "type": "object", "title": "ModelDetails" }, "ModelType": { "type": "string", "enum": ["python", "sql", "seed", "external", "source"], "title": "ModelType" }, "ModelsDiff": { "properties": { "direct": { "items": { "$ref": "#/components/schemas/ChangeDirect" }, "type": "array", "title": "Direct", "default": [] }, "indirect": { "items": { "$ref": "#/components/schemas/ChangeIndirect" }, "type": "array", "title": "Indirect", "default": [] }, "metadata": { "items": { "$ref": "#/components/schemas/ChangeDisplay" }, "type": "array", "title": "Metadata", "default": [] } }, "additionalProperties": false, "type": "object", "title": "ModelsDiff" }, "Modules": { "type": "string", "enum": [ "editor", "files", "data-catalog", "plans", "tests", "audits", "errors", "data", "lineage" ], "title": "Modules" }, "NodeType": { "type": "string", "enum": ["model", "audit"], "title": "NodeType" }, "PlanApplyStageTracker": { "properties": { "start": { "anyOf": [ { "type": "string", "format": "date" }, { "type": "string", "format": "date-time" }, { "type": "string" }, { "type": "integer" }, { "type": "number" }, { "type": "null" } ], "title": "Start" }, "end": { "anyOf": [ { "type": "string", "format": "date" }, { "type": "string", "format": "date-time" }, { "type": "string" }, { "type": "integer" }, { "type": "number" }, { "type": "null" } ], "title": "End" }, "meta": { "$ref": "#/components/schemas/TrackableMeta" }, "environment": { "anyOf": [{ "type": "string" }, { "type": "null" }], "title": "Environment" }, "plan_options": { "anyOf": [ { "$ref": "#/components/schemas/PlanOptions" }, { "type": "null" } ] }, "creation": { "anyOf": [ { "$ref": "#/components/schemas/PlanStageCreation" }, { "type": "null" } ] }, "restate": { "anyOf": [ { "$ref": "#/components/schemas/PlanStageRestate" }, { "type": "null" } ] }, "backfill": { "anyOf": [ { "$ref": "#/components/schemas/PlanStageBackfill" }, { "type": "null" } ] }, "promote": { "anyOf": [ { "$ref": "#/components/schemas/PlanStagePromote" }, { "type": "null" } ] } }, "additionalProperties": false, "type": "object", "title": "PlanApplyStageTracker" }, "PlanCancelStageTracker": { "properties": { "start": { "anyOf": [ { "type": "string", "format": "date" }, { "type": "string", "format": "date-time" }, { "type": "string" }, { "type": "integer" }, { "type": "number" }, { "type": "null" } ], "title": "Start" }, "end": { "anyOf": [ { "type": "string", "format": "date" }, { "type": "string", "format": "date-time" }, { "type": "string" }, { "type": "integer" }, { "type": "number" }, { "type": "null" } ], "title": "End" }, "meta": { "$ref": "#/components/schemas/TrackableMeta" }, "environment": { "anyOf": [{ "type": "string" }, { "type": "null" }], "title": "Environment" }, "plan_options": { "anyOf": [ { "$ref": "#/components/schemas/PlanOptions" }, { "type": "null" } ] }, "cancel": { "anyOf": [ { "$ref": "#/components/schemas/PlanStageCancel" }, { "type": "null" } ] } }, "additionalProperties": false, "type": "object", "title": "PlanCancelStageTracker" }, "PlanDates": { "properties": { "start": { "anyOf": [ { "type": "string", "format": "date" }, { "type": "string", "format": "date-time" }, { "type": "string" }, { "type": "integer" }, { "type": "number" }, { "type": "null" } ], "title": "Start" }, "end": { "anyOf": [ { "type": "string", "format": "date" }, { "type": "string", "format": "date-time" }, { "type": "string" }, { "type": "integer" }, { "type": "number" }, { "type": "null" } ], "title": "End" } }, "additionalProperties": false, "type": "object", "title": "PlanDates" }, "PlanOptions": { "properties": { "skip_tests": { "type": "boolean", "title": "Skip Tests", "default": false }, "skip_backfill": { "type": "boolean", "title": "Skip Backfill", "default": false }, "no_gaps": { "type": "boolean", "title": "No Gaps", "default": false }, "forward_only": { "type": "boolean", "title": "Forward Only", "default": false }, "no_auto_categorization": { "type": "boolean", "title": "No Auto Categorization", "default": false }, "include_unmodified": { "type": "boolean", "title": "Include Unmodified", "default": false }, "create_from": { "anyOf": [{ "type": "string" }, { "type": "null" }], "title": "Create From" }, "restate_models": { "anyOf": [{ "type": "string" }, { "type": "null" }], "title": "Restate Models" }, "auto_apply": { "type": "boolean", "title": "Auto Apply", "default": false } }, "additionalProperties": false, "type": "object", "title": "PlanOptions" }, "PlanOverviewStageTracker": { "properties": { "start": { "anyOf": [ { "type": "string", "format": "date" }, { "type": "string", "format": "date-time" }, { "type": "string" }, { "type": "integer" }, { "type": "number" }, { "type": "null" } ], "title": "Start" }, "end": { "anyOf": [ { "type": "string", "format": "date" }, { "type": "string", "format": "date-time" }, { "type": "string" }, { "type": "integer" }, { "type": "number" }, { "type": "null" } ], "title": "End" }, "meta": { "$ref": "#/components/schemas/TrackableMeta" }, "environment": { "anyOf": [{ "type": "string" }, { "type": "null" }], "title": "Environment" }, "plan_options": { "anyOf": [ { "$ref": "#/components/schemas/PlanOptions" }, { "type": "null" } ] }, "validation": { "anyOf": [ { "$ref": "#/components/schemas/PlanStageValidation" }, { "type": "null" } ] }, "changes": { "anyOf": [ { "$ref": "#/components/schemas/PlanStageChanges" }, { "type": "null" } ] }, "backfills": { "anyOf": [ { "$ref": "#/components/schemas/PlanStageBackfills" }, { "type": "null" } ] } }, "additionalProperties": false, "type": "object", "title": "PlanOverviewStageTracker" }, "PlanStageBackfill": { "properties": { "meta": { "$ref": "#/components/schemas/TrackableMeta" }, "queue": { "items": { "type": "string" }, "type": "array", "uniqueItems": true, "title": "Queue", "default": [] }, "tasks": { "additionalProperties": { "$ref": "#/components/schemas/BackfillTask" }, "type": "object", "title": "Tasks", "default": {} } }, "additionalProperties": false, "type": "object", "title": "PlanStageBackfill" }, "PlanStageBackfills": { "properties": { "meta": { "$ref": "#/components/schemas/TrackableMeta" }, "models": { "anyOf": [ { "items": { "$ref": "#/components/schemas/BackfillDetails" }, "type": "array" }, { "type": "null" } ], "title": "Models" } }, "additionalProperties": false, "type": "object", "title": "PlanStageBackfills" }, "PlanStageCancel": { "properties": { "meta": { "$ref": "#/components/schemas/TrackableMeta" } }, "additionalProperties": false, "type": "object", "title": "PlanStageCancel" }, "PlanStageChanges": { "properties": { "added": { "anyOf": [ { "items": { "$ref": "#/components/schemas/ChangeDisplay" }, "type": "array" }, { "type": "null" } ], "title": "Added" }, "removed": { "anyOf": [ { "items": { "$ref": "#/components/schemas/ChangeDisplay" }, "type": "array" }, { "type": "null" } ], "title": "Removed" }, "modified": { "anyOf": [ { "$ref": "#/components/schemas/ModelsDiff" }, { "type": "null" } ] }, "meta": { "$ref": "#/components/schemas/TrackableMeta" } }, "additionalProperties": false, "type": "object", "title": "PlanStageChanges" }, "PlanStageCreation": { "properties": { "meta": { "$ref": "#/components/schemas/TrackableMeta" }, "total_tasks": { "type": "integer", "title": "Total Tasks" }, "num_tasks": { "type": "integer", "title": "Num Tasks" } }, "additionalProperties": false, "type": "object", "required": ["total_tasks", "num_tasks"], "title": "PlanStageCreation" }, "PlanStagePromote": { "properties": { "meta": { "$ref": "#/components/schemas/TrackableMeta" }, "total_tasks": { "type": "integer", "title": "Total Tasks" }, "num_tasks": { "type": "integer", "title": "Num Tasks" }, "target_environment": { "type": "string", "title": "Target Environment" } }, "additionalProperties": false, "type": "object", "required": ["total_tasks", "num_tasks", "target_environment"], "title": "PlanStagePromote" }, "PlanStageRestate": { "properties": { "meta": { "$ref": "#/components/schemas/TrackableMeta" } }, "additionalProperties": false, "type": "object", "title": "PlanStageRestate" }, "PlanStageValidation": { "properties": { "meta": { "$ref": "#/components/schemas/TrackableMeta" } }, "additionalProperties": false, "type": "object", "title": "PlanStageValidation" }, "Query": { "properties": { "sql": { "type": "string", "title": "Sql" } }, "additionalProperties": false, "type": "object", "required": ["sql"], "title": "Query" }, "Reference": { "properties": { "name": { "type": "string", "title": "Name" }, "expression": { "type": "string", "title": "Expression" }, "unique": { "type": "boolean", "title": "Unique" } }, "additionalProperties": false, "type": "object", "required": ["name", "expression", "unique"], "title": "Reference" }, "RenderInput": { "properties": { "model": { "type": "string", "title": "Model" }, "start": { "anyOf": [ { "type": "string", "format": "date" }, { "type": "string", "format": "date-time" }, { "type": "string" }, { "type": "integer" }, { "type": "number" }, { "type": "null" } ], "title": "Start" }, "end": { "anyOf": [ { "type": "string", "format": "date" }, { "type": "string", "format": "date-time" }, { "type": "string" }, { "type": "integer" }, { "type": "number" }, { "type": "null" } ], "title": "End" }, "execution_time": { "anyOf": [ { "type": "string", "format": "date" }, { "type": "string", "format": "date-time" }, { "type": "string" }, { "type": "integer" }, { "type": "number" }, { "type": "null" } ], "title": "Execution Time" }, "expand": { "anyOf": [ { "type": "boolean" }, { "items": { "type": "string" }, "type": "array" } ], "title": "Expand", "default": false }, "pretty": { "type": "boolean", "title": "Pretty", "default": true }, "dialect": { "anyOf": [{ "type": "string" }, { "type": "null" }], "title": "Dialect" } }, "additionalProperties": false, "type": "object", "required": ["model"], "title": "RenderInput" }, "RowDiff": { "properties": { "source": { "type": "string", "title": "Source" }, "target": { "type": "string", "title": "Target" }, "stats": { "additionalProperties": { "type": "number" }, "type": "object", "title": "Stats" }, "sample": { "additionalProperties": true, "type": "object", "title": "Sample" }, "source_count": { "type": "integer", "title": "Source Count" }, "target_count": { "type": "integer", "title": "Target Count" }, "count_pct_change": { "type": "number", "title": "Count Pct Change" } }, "additionalProperties": false, "type": "object", "required": [ "source", "target", "stats", "sample", "source_count", "target_count", "count_pct_change" ], "title": "RowDiff" }, "SchemaDiff": { "properties": { "source": { "type": "string", "title": "Source" }, "target": { "type": "string", "title": "Target" }, "source_schema": { "additionalProperties": { "type": "string" }, "type": "object", "title": "Source Schema" }, "target_schema": { "additionalProperties": { "type": "string" }, "type": "object", "title": "Target Schema" }, "added": { "additionalProperties": { "type": "string" }, "type": "object", "title": "Added" }, "removed": { "additionalProperties": { "type": "string" }, "type": "object", "title": "Removed" }, "modified": { "additionalProperties": { "type": "string" }, "type": "object", "title": "Modified" } }, "additionalProperties": false, "type": "object", "required": [ "source", "target", "source_schema", "target_schema", "added", "removed", "modified" ], "title": "SchemaDiff" }, "SnapshotChangeCategory": { "type": "integer", "enum": [1, 2, 3, 4, 5, 6], "title": "SnapshotChangeCategory", "description": "Values are ordered by decreasing severity and that ordering is required.\n\nBREAKING: The change requires that snapshot modified and downstream dependencies be rebuilt\nNON_BREAKING: The change requires that only the snapshot modified be rebuilt\nFORWARD_ONLY: The change requires no rebuilding\nINDIRECT_BREAKING: The change was caused indirectly and is breaking.\nINDIRECT_NON_BREAKING: The change was caused indirectly by a non-breaking change.\nMETADATA: The change was caused by a metadata update." }, "Status": { "type": "string", "enum": ["init", "success", "fail"], "title": "Status", "description": "An enumeration of statuses." }, "TableDiff": { "properties": { "schema_diff": { "$ref": "#/components/schemas/SchemaDiff" }, "row_diff": { "$ref": "#/components/schemas/RowDiff" }, "on": { "items": { "items": { "type": "string" }, "type": "array" }, "type": "array", "title": "On" } }, "additionalProperties": false, "type": "object", "required": ["schema_diff", "row_diff", "on"], "title": "TableDiff" }, "TestCase": { "properties": { "name": { "type": "string", "title": "Name" }, "path": { "type": "string", "title": "Path" } }, "additionalProperties": false, "type": "object", "required": ["name", "path"], "title": "TestCase" }, "TestErrorOrFailure": { "properties": { "name": { "type": "string", "title": "Name" }, "path": { "type": "string", "title": "Path" }, "tb": { "type": "string", "title": "Tb" } }, "additionalProperties": false, "type": "object", "required": ["name", "path", "tb"], "title": "TestErrorOrFailure" }, "TestResult": { "properties": { "tests_run": { "type": "integer", "title": "Tests Run" }, "failures": { "items": { "$ref": "#/components/schemas/TestErrorOrFailure" }, "type": "array", "title": "Failures" }, "errors": { "items": { "$ref": "#/components/schemas/TestErrorOrFailure" }, "type": "array", "title": "Errors" }, "skipped": { "items": { "$ref": "#/components/schemas/TestSkipped" }, "type": "array", "title": "Skipped" }, "successes": { "items": { "$ref": "#/components/schemas/TestCase" }, "type": "array", "title": "Successes" } }, "additionalProperties": false, "type": "object", "required": ["tests_run", "failures", "errors", "skipped", "successes"], "title": "TestResult" }, "TestSkipped": { "properties": { "name": { "type": "string", "title": "Name" }, "path": { "type": "string", "title": "Path" }, "reason": { "type": "string", "title": "Reason" } }, "additionalProperties": false, "type": "object", "required": ["name", "path", "reason"], "title": "TestSkipped" }, "TrackableMeta": { "properties": { "status": { "$ref": "#/components/schemas/Status", "default": "init" }, "start": { "type": "integer", "title": "Start" }, "end": { "anyOf": [{ "type": "integer" }, { "type": "null" }], "title": "End" }, "done": { "type": "boolean", "title": "Done", "default": false } }, "additionalProperties": false, "type": "object", "title": "TrackableMeta" }, "ValidationError": { "properties": { "loc": { "items": { "anyOf": [{ "type": "string" }, { "type": "integer" }] }, "type": "array", "title": "Location" }, "msg": { "type": "string", "title": "Message" }, "type": { "type": "string", "title": "Error Type" } }, "type": "object", "required": ["loc", "msg", "type"], "title": "ValidationError" }, "Verbosity": { "type": "integer", "enum": [0, 1, 2], "title": "Verbosity", "description": "Verbosity levels for SQLMesh output." } } } }