hasura/graphql-engine · error · NDCValidationError
column {column_name} is not defined in function/procedure {f
Error message
column {column_name} is not defined in function/procedure {func_proc_name} in data connector {db_name} What it means
A function/procedure command's field mapping or result shape references a column that the connector's function/procedure does not declare. The resolver validates that every column used in argument/result mappings of a command exists on the underlying NDC function or procedure.
Source
Thrown at v3/crates/metadata-resolve/src/helpers/ndc_validation.rs:65
db_name: Qualified<DataConnectorName>,
model_name: Qualified<ModelName>,
field_name: FieldName,
collection_name: CollectionName,
column_name: DataConnectorColumnName,
},
#[error("procedure {procedure_name} is not defined in data connector {db_name}")]
NoSuchProcedure {
db_name: Qualified<DataConnectorName>,
command_name: Qualified<CommandName>,
procedure_name: ProcedureName,
},
#[error("function {function_name} is not defined in data connector {db_name}")]
NoSuchFunction {
db_name: Qualified<DataConnectorName>,
command_name: Qualified<CommandName>,
function_name: FunctionName,
},
#[error(
"column {column_name} is not defined in function/procedure {func_proc_name} in data connector {db_name}"
)]
NoSuchColumnForCommand {
db_name: Qualified<DataConnectorName>,
command_name: Qualified<CommandName>,
field_name: FieldName,
func_proc_name: String,
column_name: DataConnectorColumnName,
},
#[error(
"column {column_name} has type {column_type} in collection {collection_name} in data connector {db_name}, not type {field_type}"
)]
ColumnTypeDoesNotMatch {
db_name: DataConnectorName,
model_name: ModelName,
field_name: FieldName,
collection_name: CollectionName,
column_name: DataConnectorColumnName,View on GitHub (pinned to 724551b9ae)
Solutions
- Check the function/procedure's actual output columns in the connector schema and fix the field mapping in the command definition
- If the column was renamed in the database, update the metadata to use the new column name
- Refresh the connector's schema so the resolver sees current columns
Example fix
# before
output_type:
type: object
fields:
user_email: { column: usr_email } # column not returned by function
# after
output_type:
type: object
fields:
user_email: { column: user_email } Defensive patterns
Strategy: validation
Validate before calling
let cols: HashSet<_> = ndc_function.returns.columns(); assert!(cols.contains(&expected_column));
Prevention
- Validate command field mappings against the function/procedure return columns before applying metadata
When it happens
Trigger: Adding a mapped field/column in a command's output type that is not among the columns returned by the configured function or procedure; changing the function's return columns without updating command metadata.
Common situations: SELECT list of a database function changed; column renamed; copy-pasting command metadata and forgetting to update column mappings; stale connector schema.
Related errors
- function {function_name} is not defined in data connector {d
- column {column_name} is not defined in collection {collectio
- procedure {procedure_name} is not defined in data connector
- mapping for type {type_name} of command {command_name} is no
- Result type of function/procedure {function_or_procedure_nam
AI-assisted analysis of hasura/graphql-engine@724551b9ae (2026-08-28).
Data as JSON: /api/errors/2b722fddac281122.
Report an issue: GitHub.