{"record":{"id":"430bf627f1b08b52","repo":"hasura/graphql-engine","slug":"the-aggregate-expression-name-defines-an-aggrega-430bf6","errorCode":null,"errorMessage":"the aggregate expression {name} defines an aggregation function mapping to a data connector that does not support aggregates: {data_connector_name}","messagePattern":"the aggregate expression (.+?) defines an aggregation function mapping to a data connector that does not support aggregates: (.+?)","errorType":"validation","errorClass":"AggregateExpressionError","httpStatus":null,"severity":"error","filePath":"v3/crates/metadata-resolve/src/stages/aggregates/types.rs","lineNumber":221,"sourceCode":"\n    #[error(\n        \"the aggregate expression {name} specifies an aggregation function '{function_name}' that uses an unknown type for its return type: {type_name}\"\n    )]\n    AggregateOperandFunctionUnknownReturnType {\n        name: Qualified<AggregateExpressionName>,\n        function_name: AggregationFunctionName,\n        type_name: CustomTypeName,\n    },\n\n    #[error(\n        \"the aggregate expression {name} defines an aggregation function mapping to an unknown data connector: {data_connector_name}\"\n    )]\n    AggregateOperandDataConnectorMissing {\n        name: Qualified<AggregateExpressionName>,\n        data_connector_name: Qualified<DataConnectorName>,\n    },\n\n    #[error(\n        \"the aggregate expression {name} defines an aggregation function mapping to a data connector that does not support aggregates: {data_connector_name}\"\n    )]\n    AggregateOperandDataConnectorNotSupported {\n        name: Qualified<AggregateExpressionName>,\n        data_connector_name: Qualified<DataConnectorName>,\n    },\n\n    #[error(\n        \"the aggregate expression {name} specifies an aggregation function '{function_name}' but there is no mapping defined to an aggregation function in the data connector '{data_connector_name}'\"\n    )]\n    AggregateOperandDataConnectorFunctionMappingMissing {\n        name: Qualified<AggregateExpressionName>,\n        function_name: AggregationFunctionName,\n        data_connector_name: Qualified<DataConnectorName>,\n    },\n\n    #[error(\n        \"the aggregate expression {name} specifies an aggregation function '{function_name}' but the mapping to the data connector '{data_connector_name}' specifies a data connector scalar type that does not exist: {scalar_type}\"","sourceCodeStart":203,"sourceCodeEnd":239,"githubUrl":"https://github.com/hasura/graphql-engine/blob/724551b9ae87845594ef0408cff0e50eb6c90dc5/v3/crates/metadata-resolve/src/stages/aggregates/types.rs#L203-L239","documentation":"The aggregate expression maps to a data connector whose capabilities do not include aggregate support. Even though the connector exists, it advertises no aggregation functions, so the mapping cannot be satisfied.","triggerScenarios":"A data connector in metadata whose NDC capabilities response (or static capability set) has no aggregate functions, referenced by an aggregate expression's `data_connector_mappings`. Resolution of the aggregates stage fails.","commonSituations":"Using a minimal/custom NDC connector or an older connector version that doesn't implement the NDC aggregates capability; pointing aggregate metadata at an auth/webhook-style connector; upgrading a connector that dropped aggregate support.","solutions":["Check the connector's capabilities (e.g. its NDC /capabilities endpoint) for aggregate functions support","Upgrade the connector to a version that supports aggregates","Re-point the aggregate expression's mapping to a connector that does support aggregates (e.g. the Postgres NDC connector)","If aggregates aren't needed for that connector, remove the mapping"],"exampleFix":"# before\ndata_connector_mappings:\n  - data_connector_name: default/my_custom_connector # no aggregate capability\n# after\ndata_connector_mappings:\n  - data_connector_name: default/postgres","handlingStrategy":"validation","validationCode":"# Before adding an aggregate mapping, query the connector capabilities:\n# curl http://connector:8080/capabilities | jq '.aggregate_functions'\n# Ensure the target connector appears with aggregate support before mapping it.","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Check a connector's /capabilities for aggregate_functions before pointing aggregate metadata at it","Prefer first-party NDC connectors (e.g. postgres) when you need aggregations"],"tags":["opendd","metadata","aggregates","data-connector","capabilities"],"backgroundTag":"connector-capability-not-supported","analyzedSha":"724551b9ae87845594ef0408cff0e50eb6c90dc5","analyzedAt":"2026-08-28T07:32:55.105Z","schemaVersion":2},"datasetVersion":"2026-08-28T11:17:15.048Z"}