diff --git a/metricflow/query/query_parser.py b/metricflow/query/query_parser.py index 9d1390936a..b2c6aa4166 100644 --- a/metricflow/query/query_parser.py +++ b/metricflow/query/query_parser.py @@ -680,9 +680,7 @@ def _parse_linkable_elements( for linkable_element in linkable_elements: parsed_name = StructuredLinkableSpecName.from_name(linkable_element.name) if parsed_name.time_granularity: - raise ValueError( - "Time granularity must be passed in the `grain` attribute for `group_by` query param." - ) + raise ValueError("Must use object syntax for `grain` parameter if `date_part` is requested.") structured_name = StructuredLinkableSpecName( entity_link_names=parsed_name.entity_link_names, element_name=parsed_name.element_name,