-
Notifications
You must be signed in to change notification settings - Fork 5
feat(dataframe): Add data table ID and name as selection from column dropdown #639
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(dataframe): Add data table ID and name as selection from column dropdown #639
Conversation
Signed-off-by: Ahalya Radhakrishnan <[email protected]>
Signed-off-by: Ahalya Radhakrishnan <[email protected]>
Signed-off-by: Ahalya Radhakrishnan <[email protected]>
Signed-off-by: Ahalya Radhakrishnan <[email protected]>
Signed-off-by: Ahalya Radhakrishnan <[email protected]>
Signed-off-by: Ahalya Radhakrishnan <[email protected]>
Signed-off-by: Ahalya Radhakrishnan <[email protected]>
Signed-off-by: Ahalya Radhakrishnan <[email protected]>
Signed-off-by: Ahalya Radhakrishnan <[email protected]>
Signed-off-by: Ahalya Radhakrishnan <[email protected]>
Signed-off-by: Ahalya Radhakrishnan <[email protected]>
src/datasources/data-frame/datasources/v2/DataFrameDataSourceV2.ts
Outdated
Show resolved
Hide resolved
src/datasources/data-frame/datasources/v2/DataFrameDataSourceV2.ts
Outdated
Show resolved
Hide resolved
src/datasources/data-frame/datasources/v2/DataFrameDataSourceV2.ts
Outdated
Show resolved
Hide resolved
src/datasources/data-frame/datasources/v2/DataFrameDataSourceV2.ts
Outdated
Show resolved
Hide resolved
Signed-off-by: Ahalya Radhakrishnan <[email protected]>
Signed-off-by: Ahalya Radhakrishnan <[email protected]>
Signed-off-by: Ahalya Radhakrishnan <[email protected]>
Signed-off-by: Ahalya Radhakrishnan <[email protected]>
Signed-off-by: Ahalya Radhakrishnan <[email protected]>
Signed-off-by: Ahalya Radhakrishnan <[email protected]>
src/datasources/data-frame/components/v2/DataFrameQueryEditorV2.tsx
Outdated
Show resolved
Hide resolved
Signed-off-by: Ahalya Radhakrishnan <[email protected]>
Signed-off-by: Ahalya Radhakrishnan <[email protected]>
Signed-off-by: Ahalya Radhakrishnan <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR introduces Data Table ID and Data Table Name as selectable metadata fields in the column dropdown, changing them from being automatically included in all query results to opt-in selections. This allows users to control when these fields appear in their panel output, eliminating the need for exclude column transformations in existing dashboards.
Key Changes:
- Added metadata field identifiers (with
-Metadatasuffix) to distinguish them from regular columns - Modified column selection validation to exclude metadata fields from the 20-column limit
- Updated query logic to conditionally include metadata fields in results based on user selection
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
src/datasources/data-frame/types.ts |
Defined constants for metadata field identifiers and labels using -Metadata suffix pattern |
src/datasources/data-frame/datasources/v2/DataFrameDataSourceV2.ts |
Implemented core logic: prepended metadata options to column dropdown, filtered metadata from column limit checks, conditionally queried table names, and conditionally included metadata in output fields |
src/datasources/data-frame/datasources/v2/DataFrameDataSourceV2.test.ts |
Added comprehensive test coverage for metadata field selection scenarios including edge cases (only metadata fields selected, combined with regular columns, multiple tables) |
src/datasources/data-frame/components/v2/DataFrameQueryEditorV2.tsx |
Adjusted column options limit calculation to accommodate metadata field options |
src/datasources/data-frame/components/v2/DataFrameQueryEditorV2.test.tsx |
Updated test expectations to account for metadata fields in dropdown options |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 5 out of 5 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
## [4.112.0](v4.111.3...v4.112.0) (2026-01-06) ### Features * **dataframe:** Add data table ID and name as selection from column dropdown ([#639](#639)) ([a794833](a794833))
🤨 Rationale
This PR introduces Data Table ID and Data Table Name as selectable metadata fields in the column dropdown, allowing users to explicitly choose when to include these properties in their panel output.
Previous Behavior: Data Table ID and Name were automatically included in all results alongside selected columns, requiring users to add manual transformations in existing dashboards to exclude these fields when not needed.
New Behavior: Users can now selectively include Data Table ID and/or Name only when required, eliminating the need for exclude column transformations in existing dashboards.
👩💻 Implementation
-Metadatasuffix to distinguish them from regular columns intypes.tsand follow the pattern as same as other column.getColumnOptionsWithVariables()to include data table ID and name field options.aggregateTableDataRows()toconditionally adds Data Table ID and/or Name fields to results based on user selection
🧪 Testing
Added unit tests to verify the newly introduced functionality and updated the affected test cases.
✅ Checklist