DataWorks Copilot is your intelligent assistant in DataWorks. In DataWorks, you can use the default large language model (LLM), DeepSeek-R1-671B (full-power edition), or DeepSeek-R1-Distill-Qwen-32B to complete related operations in DataWorks. With the advanced reasoning power of DeepSeek-R1, DataWorks Copilot enables you to perform complex tasks, such as SQL code generation, optimization, and testing, based on natural language interactions. This greatly enhances the efficiency of extract, transform, load (ETL) development and data analysis.
Public preview
Only users who meet the following requirements can use DataWorks Copilot free of charge without the need to submit an application during the public preview period:
The users use DataWorks Basic Edition, DataWorks Standard Edition, DataWorks Professional Edition, or DataWorks Enterprise Edition.
The workspaces of the users are created in the following regions: China (Hangzhou), China (Shanghai), China (Beijing), China (Zhangjiakou), China (Shenzhen), China (Chengdu), Singapore, Malaysia (Kuala Lumpur), and Indonesia (Jakarta).
Only Alibaba Cloud accounts, tenant administrators, and other users who have the same permissions can confirm whether to join the DataWorks Copilot public preview in the confirmation dialog box.
Read the Terms of Service for DataWorks Copilot before you join the DataWorks Copilot public preview.
You can use DataWorks Copilot in the following DataWorks services: Data Studio, DataAnalysis, DataService Studio, and Operation Center.
DataWorks Copilot supports the following programming languages: SQL and Python. In the example in this topic, SQL is used.
Users can use the DeepSeek LLM in workspaces created in the following regions: China (Hangzhou), China (Shanghai), China (Beijing), China (Zhangjiakou), China (Shenzhen), and China (Chengdu).
Supported LLMs
DataWorks default LLM
DeepSeek-R1-671B (full-power edition)
DeepSeek-R1-Distill-Qwen-32B
Entry point
Log on to the DataWorks console. In the left-side navigation pane, choose . On the page that appears, select a workspace from the Select Workspace drop-down list and click Go to Data Studio.
If you want to join the DataWorks Copilot public preview, click
in the upper-right corner of the Data Studio page to enter the DataWorks Copilot chat window. You can also start DataWorks Copilot by right-clicking in the code editor and selecting DataWorks Copilot during the code editing process and use DataWorks Copilot for coding assistance.
(Optional) By default, the DataWorks default LLM is used in the DataWorks Copilot chat window. You can switch to
DeepSeek-R1-Distill-Qwen-32B
orDeepSeek-R1-671B (full-power edition)
in the lower part of the chat window to complete related operations in DataWorks.
Practical operation experience
You can click DataWorks Copilot on the welcome page of Data Studio to try DataWorks Copilot.
Features of DataWorks Copilot
Intelligent code completion
DataWorks Copilot intelligently completes the SQL statements that you write based on the obtained context information. You can press the TAB
key to accept the completion results, press CTRL + →
to accept partial results, or press the ESC
key to abandon the completion results.
If you do not want to see code hints when you modify the code, you can click the icon in the lower-right corner of the code editor to disable the intelligent code completion feature.
Code generation
DataWorks Copilot automatically converts the natural language prompts that you input into SQL statements. The following methods are supported:
In the code editor, right-click a blank area and choose to go to the DataWorks Copilot configuration page. On the DataWorks Copilot configuration page, enter a command, click Send, and then wait for DataWorks Copilot to return the result.
In the upper-right corner of the Data Studio page, click
. In the DataWorks Copilot chat window that appears on the right side of the configuration page, enter
/
. In the pop-up list, selectCode generation
, and then enter natural language prompts to request the LLM to return the required code.
Code rewriting
In the code editor, select a code snippet, and click in the upper-right corner of the Data Studio page. In the DataWorks Copilot chat window, enter your rewrite request and click Send. Wait for DataWorks Copilot to return the result.
Comment generation
DataWorks Copilot generates comments for specified SQL statements to improve the readability of the SQL statements. In the code editor, select a code snippet and right-click the code snippet to choose
, enter your command, click Send, and then wait for DataWorks Copilot to return the result.Code interpretation
DataWorks Copilot interprets specified SQL statements to improve the readability of the SQL statements. In the code editor, select a code snippet and click in the upper-right corner of the Data Studio page. In the DataWorks Copilot chat window, enter your command and click Send. Wait for DataWorks Copilot to return the result.
Code error correction
DataWorks Copilot helps you search for and fix errors in a specified code snippet. You can also start DataWorks Copilot with a few clicks in the code editor to fix syntax errors. In the code editor, select a code snippet and right-click the code snippet to choose
, enter your command, click Send, and then wait for DataWorks Copilot to return the result.Code optimization
DataWorks Copilot allows you to optimize the selected SQL code. DataWorks Copilot helps you simplify the code logic, improve the code running efficiency, and reduce the load on your database. Click in the upper-right corner of the Data Studio page. In the DataWorks Copilot chat window, enter
/
. In the pop-up list, select Code Optimization. Enter the desired code snippet in the chat window, click Send, and then wait for DataWorks Copilot to return the result.
Code testing
DataWorks Copilot can generate a test solution and test code based on the selected SQL code. This helps you verify whether each part of the task code runs as expected. Click in the upper-right corner of the Data Studio page. In the DataWorks Copilot chat window, enter
/
. In the pop-up list, select Code Testing. Enter the desired code snippet in the chat window, click Send, and then wait for DataWorks Copilot to return the result.
Code Q&A
DataWorks Copilot provides interpretations of and usage examples for your proposed SQL syntax or MaxCompute functions to help deepen your understanding of the SQL syntax and functions. Click in the upper-right corner of the Data Studio page. In the DataWorks Copilot chat window, enter your command and click Send. Wait for DataWorks Copilot to return the result.
Intelligent table creation
In the left-side navigation pane of the Data Studio page, click Data Catalog. In the DATA CATALOG pane, select a data catalog and create a table in the catalog. In the top toolbar of the page that appears, click Use Copilot to Create Table. On the page that appears, enter your command in the displayed field, click Send, and then wait for DataWorks Copilot to return the result.
Generation of intelligent charts and insights
In the left part of the SQL query result tab in DataAnalysis, click the chart icon. Click Copilot at the top and wait for DataWorks Copilot to return the result.
Description generation
When you create a user-defined function (UDF) in Data Studio, you must describe the functionality of the UDF and the code changes that you made to allow reviewers to understand the functionality of the UDF. In this case, you need to only click the Copilot icon in the lower-right corner of the description field. The LLM automatically generates a description for the UDF.