Skip to content

fix: Table chart dimension fallback in normalize_dimensions#1367

Draft
sentry[bot] wants to merge 1 commit into
mainfrom
seer/fix/table-chart-dimension-fallback
Draft

fix: Table chart dimension fallback in normalize_dimensions#1367
sentry[bot] wants to merge 1 commit into
mainfrom
seer/fix/table-chart-dimension-fallback

Conversation

@sentry
Copy link
Copy Markdown

@sentry sentry Bot commented May 22, 2026

This PR addresses the ValueError: At least one dimension is required for table charts (DALGO-BACKEND-27X) occurring when requesting data previews for table charts via the public API.

Problem:
Table charts were failing if dimensions were specified using the legacy dimension_col and extra_dimension fields, while the dimensions list in the payload was empty. The normalize_dimensions function, specifically for chart_type == "table", was only checking payload.dimensions and not falling back to the legacy fields, leading to an empty list of dimensions being returned.

Root Cause:
The normalize_dimensions function had a missing fallback mechanism for table charts. While the non-table chart branch correctly utilized dimension_col and extra_dimension when payload.dimensions was not provided, the table chart branch did not, despite its docstring indicating backward compatibility handling.

Solution:
Implemented a fallback in normalize_dimensions for table charts. If payload.dimensions is empty or contains only blank strings, the function now populates the dimensions list using payload.dimension_col and payload.extra_dimension, ensuring that charts configured with these legacy fields function correctly.

Fixes DALGO-BACKEND-27X

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants