After you edit data in or import data into a DataWorks workbook, you can export the workbook, download the workbook, or share the workbook with specified users. This topic describes how to export a workbook, download a workbook, and share a workbook with specified users after data analysis is complete.
Prerequisites
Allow sharing and Allow downloads in the EditQuery result policy dialog box of the Query result control tab on the Data query and analysis control page in Security Center are turned on by using your Alibaba Cloud account. For more information about how to configure settings on the Data query and analysis control page, see Use the data query and analysis control feature.
Background information
Workbook sharing is suitable for the following scenarios:
Collaboratively edit a workbook with multiple users.
For example, a workbook is used to collect the personal information of team members and information about whether they enroll for an event. You can share the workbook with the team members and grant them the permissions to edit the workbook.
Share analysis results with other users.
You can share a workbook with other users and grant them the permissions to view the workbook.
Go to the workbook editing page
In the left-side navigation pane of the DataAnalysis page, click the icon. In the All Spreadsheets section of the page that appears, click the name of the workbook that you created to go to the workbook editing page.
Export a workbook
A workbook that you want to export can contain a maximum of 100 rows of data.
In the upper-right corner of the workbook editing page, choose
.In the Export as MaxCompute Table dialog box, configure the parameters.
Insert mode
Parameter
Description
Insert Data into MaxCompute Table (INSERT OVERWRITE) (insert overwrite)
Workspace
The workspace to which the MaxCompute table belongs.
Table
The MaxCompute table to which you want to insert data.
Create MaxCompute Table and Insert Data (INSERT OVERWRITE)
Workspace
The workspace to which the MaxCompute table belongs.
Table Name
The name of the new MaxCompute table. Make sure that the table name is unique. You can click Check Duplicate Names to check whether the table name exists.
After the parameters are configured, click Copy SQL Statement and click Close.
ImportantOnly non-partitioned tables are supported.
Click the icon in the upper-left corner of the workbook editing page and choose .
Insert data to an existing MaxCompute table, or create a MaxCompute table and insert data to the created table.
Insert Data into MaxCompute Table (INSERT OVERWRITE) (insert overwrite)
If you select Insert Data into MaxCompute Table (INSERT OVERWRITE) (insert overwrite) as the insert mode, go to the configuration page of the MaxCompute table to which you want to insert data. On the configuration page of the MaxCompute table, click DDL Statement. In the DDL Statement dialog box, paste the copied SQL statement and click Generate Table Schema.
Create MaxCompute Table and Insert Data (INSERT OVERWRITE)
If you select Create MaxCompute Table and Insert Data (INSERT OVERWRITE) as the insert mode, create a MaxCompute table and execute the copied SQL statement. For more information about how to create a MaxCompute table, see Create and manage MaxCompute tables.
Click Commit to Development Environment and Commit to Production Environment in sequence on the configuration page of the MaxCompute table.
If you are using a workspace that is in basic mode, you need to only click Commit to Production Environment.
Share a workbook
In the upper-right corner of the workbook editing page, click Share. In the dialog box that appears, specify the sharing method based on your business requirements.
You can configure the following information before you share a workbook with other users:
Link: After you perform configuration in the Users with Edit Access and Users with Read Access sections or turn on Visible to All, click Copy Link and Access Code and send the copied URL to other users based on your business requirements.
If you turn on Access Code, a URL with an access code is generated.
Users with Edit Access: To allow specified users to have edit permissions on a workbook, click Add in the Users with Edit Access section. In the dialog box that appears, enter and select the names of the users to be granted the edit permissions, and click OK.
Visible to All: To allow all users to view a workbook, turn on Visible to All.
Users with Read Access: To allow specified users to have read permissions on the workbook, turn off Visible to All and click Add in the Users with Read Access section. In the dialog box that appears, enter and select the names of the users to be granted the read permissions, and click OK.
The maximum number of users with the edit permissions and the maximum number of users with the read permissions vary based on the DataWorks edition of your workspace.
Item/Edition | Basic Edition | Standard Edition | Professional Edition | Enterprise Edition |
Maximum number of users with the edit permissions | 0 | 3 | 5 | 10 |
Maximum number of users with the read permissions | 0 | 10 | 20 | 30 |
After the sharing method is configured, you can send the URL to specified users. The users can use the URL to access the specified workbook.
After a workbook is shared, you can click View Records in the upper-right corner of the workbook editing page to view the users who have viewed the workbook.
On the Spreadsheet page, you can also view the workbooks that are shared with you.
Download a workbook
In the upper-right corner of the workbook editing page, click Download to download the specified workbook to a local directory.