hasura/graphql-engine · error · NDCValidationError
column {column_name} is not defined in collection {collectio
Error message
column {column_name} is not defined in collection {collection_name} in data connector {db_name} What it means
NDCValidationError::NoSuchColumn is thrown when a field on a model maps to a column (DataConnectorColumnName) that the connector's schema does not define for the mapped collection. During NDC validation each mapped field's column is looked up in the collection's columns; a miss raises this with db_name, model_name, field_name, collection_name, and column_name.
Source
Thrown at v3/crates/metadata-resolve/src/helpers/ndc_validation.rs:43
collection_name: CollectionName,
},
#[error(
"argument {argument_name} is not defined for collection {collection_name} in data connector {db_name}"
)]
NoSuchArgument {
db_name: Qualified<DataConnectorName>,
collection_name: CollectionName,
argument_name: DataConnectorArgumentName,
},
#[error(
"argument {argument_name} is not defined for function/procedure {func_proc_name} in data connector {db_name}"
)]
NoSuchArgumentForCommand {
db_name: Qualified<DataConnectorName>,
func_proc_name: String,
argument_name: DataConnectorArgumentName,
},
#[error(
"column {column_name} is not defined in collection {collection_name} in data connector {db_name}"
)]
NoSuchColumn {
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>,View on GitHub (pinned to 724551b9ae)
Solutions
- Confirm the column exists on the underlying table with exact name/case
- Update the field mapping's column_name in metadata to the current column
- Refresh the connector's schema cache so it reflects recent DDL
- If the column is gone intentionally, remove the field mapping
Example fix
// before
"field_mappings": { "name": { "column": "full_name" } }
// after
"field_mappings": { "fullName": { "column": "full_name" } } Defensive patterns
Strategy: validation
Validate before calling
let coll = schema.collections.iter().find(|c| c.name == collection_name).unwrap();
let cols: HashSet<_> = coll.columns.keys().collect();
for field in field_mappings {
assert!(cols.contains(&field.column_name), "column {} missing on {}", field.column_name, collection_name);
} Type guard
fn column_exists(name: &DataConnectorColumnName, coll: &NdcCollection) -> bool {
coll.columns.contains_key(name)
} Try / catch
Match NoSuchColumn and report the model field, expected column, and the collection's available columns.
Prevention
- Run metadata validation after DB migrations
- Automate field-mapping generation from connector schema
- Watch for column-name case sensitivity across databases
When it happens
Trigger: A field mapping referencing a column dropped/renamed in the database; column name case mismatch; connector schema stale after DDL; mapping copied from another table with different column names.
Common situations: Database migrations renaming columns; multiple environments with schema drift; hand-authored field mappings; connectors with case-sensitive column naming.
Related errors
- the type {unknown_ndc_type:} is not defined as an object typ
- collection {collection_name} is not defined in data connecto
- argument {argument_name} is not defined for collection {coll
- procedure {procedure_name} is not defined in data connector
- unable to parse server endpoint: %w
AI-assisted analysis of hasura/graphql-engine@724551b9ae (2026-08-28).
Data as JSON: /api/errors/43d2a206a953311b.
Report an issue: GitHub.