Creating queries with AI assistance in Playground
You can use the SQL copilot from within Playground to generate, optimize, and debug SQL queries using natural language prompts. SQL copilot is integrated into Playground, which enhances the query writing experience by automatically generating SQL queries based on your data sources.
Maximum of five data sources can be used for query execution.
-
Query Generation: You can input natural language descriptions for your desired SQL queries.
-
Query Optimization: Use the Optimize Query function to refine complex queries for improved efficiency.
-
Query Debugging: Use the Debug Query function to identify and correct errors in generated or existing queries.
To create queries with AI assistance in Playground, do the following:
-
On the Home page, from left navigation panel, click Playground and then click the AI icon from the upper right corner to open the SQL Copilot window.
-
Click the Select Data Sources, select the required data sources and click Apply. You can select up to five data sources.
-
In the chat input area, you can choose from a list of open AI models such as GPT-4o.
-
In the chat input area, describe your desired SQL query using natural language. The AI will generate the corresponding SQL query.
-
Review the generated query for accuracy and click the Run button to execute the query within the Playground and view the output.
-
Copy the generated query to the SQL editor and use these steps to save the query.
-
If the query is complex or inefficient, click the Optimize Query button to refine it.
-
If the query has errors, click the Debug Query button to identify and correct them.
-
Click the Copy to clipboard icon to copy the generated query.
-
Continue the conversation to refine the query or ask follow-up questions or click New Chat to begin a new conversation.
-
Hover over the generated results to edit the message, regenerate, or delete the message.
-