Through the experiments in this topic, you will experience the capabilities of DataWorks Copilot as a programming assistant, including code generation, code rewriting, code interpretation, code completion, one-click error correction, and interpretation of syntax and functions. You will also explore various clever agent capabilities, such as AI-aided table creation, intelligent chart generation, and description generation for node and function deployment.
Background information
DataWorks overview
DataWorks is an intelligent, lakehouse-based data development and governance platform that leverages the big data development methodology of Alibaba Group based on 15 years of big data experience. DataWorks is deeply compatible with dozens of big data and AI computing services provided by Alibaba Cloud, such as MaxCompute, E-MapReduce (EMR), Hologres, Realtime Compute for Apache Flink, and Platform for AI (PAI). DataWorks supports intelligent extract, transform, load (ETL) development, data analysis, and proactive data asset governance for data warehouses, data lakes, and the OpenLake lakehouse architecture to facilitate data management throughout the Data+AI lifecycle. Since 2009, DataWorks has continuously productized and refined the Alibaba data system to serve various industries such as public service sectors, finance, retail, Internet, automobile, and manufacturing. DataWorks has earned the trust of tens of thousands of customers who choose DataWorks for digital transformation and value creation.
DataWorks Copilot is your intelligent assistant. You can choose to use the default DataWorks model, Qwen3-235B-A22B, DeepSeek-R1-0528, or Qwen3-Coder to perform Copilot operations. 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 ETL development and data analysis.
Precautions
The regions and DataWorks editions in which the DataWorks Copilot public preview is available are limited. For more information, see the Public preview description section in the "DataWorks Copilot" topic.
DataWorks Copilot supports SQL and Python. SQL is used in the experiments.
The features of DataWorks Copilot do not vary based on compute engine types. DataWorks Copilot supports all code-type nodes. In the experiments, MaxCompute nodes are used.
Environment preparation
DataWorks is activated. For more information, see Activate DataWorks.
A DataWorks workspace is created. For more information, see Create a workspace.
Your account meets the public preview requirements of DataWorks Copilot and has joined the public preview. For more information, see DataWorks Copilot Ask mode.
Experiment procedure
The experiments in the following sections are not in any particular order. You can try them out as you choose.
NL2Code
DataWorks Copilot returns SQL code based on natural languages.
In the DATA STUDIO pane, click the
icon to the right of Workspace Directories and choose Create Node > MaxCompute > MaxCompute SQL. 
In the popover that appears, enter a node name and press the Enter key.
Preset node name:
ads_ec_ec360_gmv_kpi_overview
In the code editor, click
to ask DataWorks Copilot to do somethingand open the Copilot Chat interface. In the interface, enter a command, click Send, and wait for Copilot to return the result.Preset instruction:
Collect statistics on the following information about each Standard Product Unit (SPU) based on the dwd_ec_trd_create_ord_di table in the time period from September 1 to 18, 2024: sales revenue, sales volume, number of Stock Keeping Units (SKUs), number of buyers, and number of sellers.


Intelligent code completion
DataWorks Copilot can complete your code.
In the DATA STUDIO pane, create a MaxCompute node. In the code editor, click Copilot to open the Copilot Chat interface. Enter any code snippet that contains a table name, press Space or Enter, and wait for Copilot to return the result.

Intelligent Q&A
In DataWorks Copilot, you can perform the following operations by using natural languages, such as correcting code errors, generating code comments, and interpreting code. DataWorks Copilot can also answer questions about SQL syntax and functions.
SQL rewriting
In the DATA STUDIO pane, create a MaxCompute node. In the code editor of the MaxCompute node, enter and select a code snippet, and click Copilot in the upper-right corner of the Data Studio page. In the DataWorks Copilot chat window, enter your rewrite request and click Send. Then wait for DataWorks Copilot to return the result.
Preset instruction:
Modify the SQL statement to transform the query results from columns to rows by using the UNPIVOT operation.

SQL error correction
In the DATA STUDIO pane, create a MaxCompute node. In the code editor of the MaxCompute node, select and right-click a code snippet and choose Copilot > SQL Rectify. In the DataWorks Copilot chat popover, click Send, and wait for DataWorks Copilot to return the result.

SQL interpretation
In the DATA STUDIO pane, create a MaxCompute node. In the code editor of the MaxCompute node, select a code snippet, and click Copilot in the upper-right corner of the Data Studio page. In the DataWorks Copilot chat window, enter your instruction, and click Send. Then wait for DataWorks Copilot to return the result.
Preset instruction:
Interpret the SQL statement.

Comment generation
In the DATA STUDIO pane, create a MaxCompute node. In the code editor of the MaxCompute node, select and right-click a code snippet and choose Copilot > SQL Comments. In the DataWorks Copilot chat popover, enter your instruction, click Send, and then wait for DataWorks Copilot to return the result.
Preset instruction:
Add a comment for each field.

Q&A about SQL syntax and functions
In the DATA STUDIO pane, click Copilot in the upper-right corner of the Data Studio page. In the DataWorks Copilot chat window, enter your instruction and click Send. Then wait for DataWorks Copilot to return the result.
Preset instruction 1:
How to use the Common Table Expression (CTE) syntax in MaxCompute?Preset instruction 2:
How to use MapJoin in MaxCompute?Preset instruction 3:
How to use the MaxCompute PIVOT function?Preset instruction 4:
A table contains an auto-incrementing ID field whose values are not continuous. How to obtain the range of IDs by page in the table?Preset instruction 5:
I have tables named t1(name) and t2(name). Write an SQL statement to achieve the following purpose: If no query result is returned for t1.name, use the query result of t2.name.

AI Agent
DataWorks services, such as Data Studio, DataAnalysis, Data Map, and DataService Studio, let you use DataWorks Copilot to conveniently perform certain operations, making the services easier to use. For example, you can use the table creation assistant of DataWorks Copilot to create a table by entering the table name keyword. You can use the analysis assistant of DataWorks Copilot to view charts about data query results and obtain the data insights with a few clicks.
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. Enter your instruction in the displayed field, click Send, and then wait for DataWorks Copilot to return the result.
Preset instruction: Member registration information table

Generation of data charts and data insights
In the DATA STUDIO pane, create a MaxCompute node. In the code editor of the MaxCompute node, select an executable code snippet and click Run in the top toolbar. After the SQL statements are successfully run and the query results are generated, click the chart icon on the RESULT tab, which appears at the page bottom. In the area that appears on the right, click Copilot and wait for DataWorks Copilot to return the result.

Description generation
Description generation for node deployment
In the DATA STUDIO pane, create a MaxCompute node. In the code editor of the MaxCompute node, select an executable code snippet and click Properties in the right-side navigation pane. On the tab that appears, configure the parameters and click Deploy in the top toolbar. On the DEPLOY tab, which appears at the page bottom, click the DataWorks Copilot icon in the lower-right corner of the input box in Step 3: Deploy to Production Environment and wait for DataWorks Copilot to return the result.
Preset node name: ads_ec_ec360_gmv_kpi_overview

Description generation for functions
In the left-side navigation pane of the Data Studio page, click Resource Management. In the RESOURCE MANAGEMENT pane, find an existing MaxCompute function, or create one. On the configuration tab of the MaxCompute function, click the DataWorks Copilot icon in the lower-right corner of the Description field and wait for DataWorks Copilot to return the result.
Preset function name: udfjaccardsimilarity
