Understanding and Editing the SQL Query

The SQL section is where you can view, modify, and execute queries that define the dataset used for chart visualization.

Key Features of the SQL Section

1. Editing the SQL Query

  • The SQL query displayed here is either:

    • AI-generated based on the selected intent and data sources.

    • User-defined if imported from the Data Explorer flow.

  • Users can modify the query manually if they need to adjust the dataset.


2. Executing the SQL Query

  • Click "Execute" to run the query.

  • The system will process the query using the syntax of the selected data source.


3. Viewing the Query Results

  • The Data Table section displays the results of the executed query.

  • This provides a preview of the dataset before applying it to the chart.


4. Handling Errors & Fixing Issues

  • If there is a syntax error, an error message will be displayed.

  • The system will provide a prompt to fix the error.

  • You can manually edit the query or use the AI assistant for corrections.


5. Applying the Query to the Chart

  • Once the query is error-free, click the "Apply" button.

  • This step is mandatory as it provisions the dataset for chart customization.

📌 Without applying the dataset, the chart cannot proceed to customization.


6. Navigating Back to Data Explorer

  • Clicking the "Explorer" button takes you back to the Data Explorer flow.

  • This allows users to refine their dataset before finalizing the chart.


Next Steps: Customizing Your Chart

Once the query is successfully applied, you can move to the Chart Customization section to configure the visualization settings. 🚀

Last updated