{"record":{"id":"5c2a5cf274faeb8a","repo":"hasura/graphql-engine","slug":"procedure-procedure-name-is-not-defined-in-data","errorCode":null,"errorMessage":"procedure {procedure_name} is not defined in data connector {db_name}","messagePattern":"procedure (.+?) is not defined in data connector (.+?)","errorType":"validation","errorClass":"NDCValidationError","httpStatus":null,"severity":"error","filePath":"v3/crates/metadata-resolve/src/helpers/ndc_validation.rs","lineNumber":53,"sourceCode":"    #[error(\n        \"argument {argument_name} is not defined for function/procedure {func_proc_name} in data connector {db_name}\"\n    )]\n    NoSuchArgumentForCommand {\n        db_name: Qualified<DataConnectorName>,\n        func_proc_name: String,\n        argument_name: DataConnectorArgumentName,\n    },\n    #[error(\n        \"column {column_name} is not defined in collection {collection_name} in data connector {db_name}\"\n    )]\n    NoSuchColumn {\n        db_name: Qualified<DataConnectorName>,\n        model_name: Qualified<ModelName>,\n        field_name: FieldName,\n        collection_name: CollectionName,\n        column_name: DataConnectorColumnName,\n    },\n    #[error(\"procedure {procedure_name} is not defined in data connector {db_name}\")]\n    NoSuchProcedure {\n        db_name: Qualified<DataConnectorName>,\n        command_name: Qualified<CommandName>,\n        procedure_name: ProcedureName,\n    },\n    #[error(\"function {function_name} is not defined in data connector {db_name}\")]\n    NoSuchFunction {\n        db_name: Qualified<DataConnectorName>,\n        command_name: Qualified<CommandName>,\n        function_name: FunctionName,\n    },\n    #[error(\n        \"column {column_name} is not defined in function/procedure {func_proc_name} in data connector {db_name}\"\n    )]\n    NoSuchColumnForCommand {\n        db_name: Qualified<DataConnectorName>,\n        command_name: Qualified<CommandName>,\n        field_name: FieldName,","sourceCodeStart":35,"sourceCodeEnd":71,"githubUrl":"https://github.com/hasura/graphql-engine/blob/724551b9ae87845594ef0408cff0e50eb6c90dc5/v3/crates/metadata-resolve/src/helpers/ndc_validation.rs#L35-L71","documentation":"NDCValidationError::NoSuchProcedure means metadata defines a command backed by a data connector procedure, but the connector's schema response does not contain a procedure with that name. The resolver validates the procedure reference (command_name and procedure_name) against the connector's procedures list and fails when absent.","triggerScenarios":"A command mapped to an NDC procedure that was renamed/dropped in the database; connector pointed at a database where the procedure doesn't exist; typo in procedure_name; procedures not exposed by the connector's capabilities/schema.","commonSituations":"DB migrations removing stored procedures; environment drift; connector upgrades disabling procedure support; metadata referencing a procedure never created in this environment.","solutions":["Verify the stored procedure exists in the target database with the exact name (including case and any schema qualification)","Correct the procedure_name in the command's NDC mapping","Ensure the connector's schema/capabilities expose procedures and refresh the schema","Recreate the procedure in the database if it was dropped"],"exampleFix":"// before\n\"ndc_procedure_name\": \"getUsrById\"\n// after\n\"ndc_procedure_name\": \"get_user_by_id\"","handlingStrategy":"validation","validationCode":"let procs: HashSet<_> = schema.procedures.iter().map(|p| p.name.clone()).collect();\nassert!(procs.contains(&procedure_name),\n    \"procedure {procedure_name} not defined by connector {db_name}\");","typeGuard":"fn procedure_exists(name: &ProcedureName, s: &NdcSchema) -> bool {\n    s.procedures.iter().any(|p| &p.name == name)\n}","tryCatchPattern":"On NoSuchProcedure, suggest verifying the stored procedure exists and that connector capabilities expose procedures.","preventionTips":["Include procedure creation in migrations","Refresh connector schema after creating/dropping procedures","Verify connector capabilities advertise procedure support before mapping commands"],"tags":["ndc","procedure","data-connectors","schema-validation"],"backgroundTag":"procedure-not-found","analyzedSha":"724551b9ae87845594ef0408cff0e50eb6c90dc5","analyzedAt":"2026-08-28T07:32:55.105Z","schemaVersion":2},"datasetVersion":"2026-08-28T11:17:15.048Z"}