All Products
Search
Document Center

DataWorks:Export, share, and download a workbook

Last Updated:Feb 20, 2024

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

  1. Go to the workbook page.
  2. 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

Note

A workbook that you want to export can contain a maximum of 100 rows of data.

  1. In the upper-right corner of the workbook editing page, choose Export > Generate MaxCompute Build Table Statement.

  2. 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 new 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.

  3. After the parameters are configured, click Copy SQL Statement and click Close.

    Important

    Only non-partitioned tables are supported.

  4. Click the ste icon in the upper-left corner of the workbook editing page and choose All Products > Data Development And Task Operation > DataStudio.

  5. 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.

  6. 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.

image

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 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.

    Note

    You can grant the edit permissions to a maximum of 10 users.

  • 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 view 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.

    Note

    You can grant the read permissions to a maximum of 30 users.

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.下载