durgaprasadml commented on issue #40917:
URL: https://github.com/apache/superset/issues/40917#issuecomment-4671639128

   Thanks for the detailed issue description — I investigated the current MCP 
implementation and started working on a fix for the parity gaps around adhoc 
SQL metrics and virtual dataset authoring.
   
   ### Current Findings
   
   The backend already supports adhoc SQL metrics through existing metric 
validation paths (sql_expression support inside metric schemas / form_data 
handling). The main gaps appear to be:
   
   - MCP schema discoverability
   - chart schema examples
   - LLM guidance/prompts
   - virtual dataset authoring support for metrics/calculated columns
   
   ### Implemented Changes
   
   #### Virtual Dataset Support
   - Extended CreateVirtualDatasetRequest to support:
     - metrics
     - calculated_columns
   - Updated create_virtual_dataset flow to persist these via 
UpdateDatasetCommand after dataset creation
   - Added unit tests covering metric and calculated column persistence
   
   #### Chart Authoring Improvements
   - Improved MCP chart-authoring guidance/examples for adhoc SQL metrics using 
sql_expression
   - Added examples for:
     - ratio metrics
     - weighted averages
     - conditional aggregates
   - Updated chart schema example payloads to demonstrate valid adhoc SQL 
metric configurations
   
   ### Notes
   
   The implementation focuses on enabling the full MCP workflow while 
preserving backward compatibility and reusing existing Explore-side metric 
handling instead of introducing a parallel metric system.
   
   Currently running final validation/tests before opening the PR.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to