Data query and control
Manage how workspace roles and members access data sources and control operations on query results—such as displaying, copying, downloading, and sharing—to ensure data security.
Background
When Data Analysis users run tasks with a specified identity—such as a username/password, a RAM user, or a RAM role configured as the default access identity of a data source—they must be authorized in Security Center to access that data source. If users access a data source with their logon identity, Security Center authorization is not required.
Data Query and Control lets you manage data source query permissions and control operations on query results, such as displaying, copying, downloading, and sharing.
Data source query permission management
Manage permissions to query a data source.
Grant permissions to users or roles through the Manage data source query permissions feature. Note the following:
After you grant a member or role permission to query a data source, they will use the RAM user or RAM role specified as the access identity for that data source. To ensure data security, especially for production data, we recommend that you plan permissions with caution before you grant them.
In a standard mode workspace, you must manage data source query permissions separately for the development and production environments.
NoteFor more information, see Appendix: View the access identity of a data source, Differences between workspace modes, and Data source environments.
This feature manages only query permissions on a data source. To manage read and write permissions on a data source, see Data Integration task approval process.
Permission management for operations on query results
Data Analysis supports displaying, copying, downloading, and sharing query results. Configure control policies to secure these operations.
Default permissions
Query result control
All users have permissions to display, copy, download, and share query results.
Use the Manage query result operations feature to configure permission management policies:
Control whether users can copy, download, or share result data.
Limit the number of rows that can be displayed, copied, or downloaded.
Limitations
Data source query permission management
Data source query permission management has the following limitations.
Restriction category
Description
Applicable module
Permission management applies only to the Data Analysis module.
Supported data source types
You can manage permissions only for the data source types supported by Data Analysis.
NoteFor more information about the data source types that Data Analysis supports, see Data sources supported for SQL queries.
Role restrictions
Users with the Tenant Administrator or Tenant Security Administrator role can grant permissions on data sources in all workspaces within the current tenant.
Users with the Workspace Administrator role can grant permissions only on data sources in the workspaces that they manage.
Permission management for operations on query results
Managing permissions for query result operations has the following limitations.
Restriction category
Description
Applicable module
Query result permission management applies to Data Analysis and the new version of Data Studio.
Operation restrictions
You can manage permissions for display, copy, download, and share operations.
Number of rows to display: A maximum of 10,000 rows can be displayed. The default is 10,000.
Number of rows to copy: A maximum of 10,000 rows can be copied. The default is 100.
Number of rows to download: The maximum number of rows that you can download varies by DataWorks edition. For more information, see Appendix: Maximum number of rows that can be downloaded for each DataWorks edition.
Region and role restrictions
The query result control policy applies to all workspaces within the tenant in the current region. Only users with the Tenant Administrator or Tenant Security Administrator role can edit the control policy.
NoteFor a single tenant, you must configure query result control policies separately for each region.
To edit the control policies, you can assign the Tenant Administrator or Tenant Security Administrator role to a user.
Go to Data Query and Control
Go to Security Center.
Log on to the DataWorks console. In the target region, click in the left-side navigation pane. On the page that appears, click Go to Security Center.
In the left-side navigation pane, click .
On the Data Query and Control page, you can perform the following operations:
Grant a member or role permission to query a specified data source in the Data Analysis module. For more information, see Manage data source query permissions.
Define control policies for operations on query results, such as displaying, copying, downloading, and sharing. For more information, see Manage query result operations.
Manage data source query permissions
If you have not created a data source, go to the Data Source Management page to create one first.
To grant a member or role permission to query a data source in the Data Analysis module of a specified workspace, find the data source in the list, click Authorize in the Actions column, and then configure the parameters in the Authorize dialog box.
Parameter | Description |
Workspace | You can select only workspaces in which the current account has the Workspace Administrator role. After you select a workspace, all data sources within that workspace are displayed, and you can grant permissions on them. Note To assign the Workspace Administrator role to a user, see Manage workspace-level module permissions. |
Authorized object | The target data source that you want to query. For more information about supported data source types, see Supported data source types. |
Authorized space role | Select the workspace roles that can query the target data source. |
Member of authorized space | Select the workspace members who can query the target data source. Note You can select only members of the chosen workspace. To add a user as a workspace member, see Manage workspace-level module permissions. |
Query module | Specifies the module where this authorization takes effect. Currently, you can grant a member or role only the permissions to query a specified data source in the Data Analysis module. |
Manage Data Analysis query result operations
This section describes query result controls for Data Analysis. For Data Studio controls, see Manage Data Studio operations. On the tab, find the policy whose scope is Data Analysis and click Edit to edit the policy. Data Analysis supports the following controls:
Control whether users can copy, download, or share result data.
Limit the number of rows that can be displayed, copied, or downloaded.
For a single tenant, you must configure query result control policies separately for each region.
Number of rows to display: A maximum of 10,000 rows can be displayed. The default is 10,000.
Number of rows to copy: A maximum of 10,000 rows can be copied. The default is 100.
Number of rows to download: The maximum number of rows that you can download varies by DataWorks edition. For more information, see Appendix: Maximum number of rows that can be downloaded for each DataWorks edition.
After you edit the control policy, click View in the Operation column to view its basic information.
The query result control policies configured here apply to the corresponding Data Analysis or new Data Studio module. They do not apply to APIs published by DataService Studio. The number of records that a DataService Studio API returns is controlled by Maximum Number of Data Records for a Single Request (2,000 by default) and the pagination settings in the API configuration. These settings are independent of the policies configured here. For more information, see Data service APIs and When should I enable pagination for API responses?.
Manage Data Studio operations
On the Query result control tab, find the policy whose scope is Data Studio and click Edit. This policy contains controls for both query results and the individual development environment.
Query results
Both Data Studio and Data Analysis support controls for displaying, copying, and downloading query results, but their policies must be configured separately. Data Studio also controls the option to export results to a spreadsheet. This option differs from the sharing control in Data Analysis.
Control | Description |
Display query results | Set the maximum number of records displayed for a single query. |
Copy | Control whether query results can be copied and set the maximum number of records copied in a single operation. |
Export to a local file | Control whether query results can be exported or downloaded to a local file and set the maximum number of rows exported or downloaded in a single operation. |
Export to a spreadsheet | Control whether users can see the option to export query results to a spreadsheet in Data Studio. |
The new version of Data Studio supports full-result downloads from the query results area. Full-result downloads remain subject to the DataWorks edition, the query result control policy, and data source limits. For download limits, see the appendix in this topic. These row limits apply to query result exports or downloads, not file downloads from the personal directory.
Individual development environment
On the Query result control tab, find the policy whose scope is Data Studio and click Edit. The individual development environment settings in the same policy control extensions, terminal usage, and file downloads from the individual development environment instance mount directory.
The controls for the individual development environment and personal directory file downloads are as follows:
Control item | Control level | Description |
Download File | Per operation | If this feature is enabled, users can download files from the personal directory > individual development environment instance mount directory.
|
Extension - Install | User-level | If this feature is enabled, users can search for, view details of, and install extensions.
|
Terminal | User-level | If this feature is enabled, users can use the terminal in the individual development environment.
|
My Files downloads | Per download | On the Query result control tab, find the policy whose scope is Data Development > Personal Catalog and click Edit to control downloads from Personal Directory > My Files Downloads. Configure this switch separately from the switch for file downloads from the individual development environment instance mount directory. |
If the corresponding file download switch is enabled and a download from the mount directory or My Files matches a download approval rule configured in risk identification rules, approval is required. After approval, users can download the file from Upload and Download.
Only users with the Tenant Administrator or Tenant Security Administrator role can configure control policies for the individual development environment.
Appendix: View data source access identity
-
Log on to the DataWorks console. In the target region, click in the left-side navigation pane. Select a workspace from the drop-down list and click Go to Management Center.
The steps to view the access identity vary by data source type.
If the data source is an EMR or CDH/CDP cluster: In the left-side navigation pane, click Cluster Management and view the Default Access Identity of the corresponding cluster.
For other data sources: In the left-side navigation pane, click . Find the target data source, click Edit in the Actions column, and view the Default Access Identity or Username.
Appendix: Download row limits by edition
The following limits apply to full-result downloads in Data Analysis and the new version of Data Studio: 0 rows for Basic Edition, 200,000 rows for Standard Edition, 2,000,000 rows for Professional Edition, and 5,000,000 rows for Enterprise Edition. Display limits and full-result download limits apply separately.
This is the maximum number of rows that DataWorks supports for download, not your actual download limit. The actual limit depends on the DataWorks edition, the query result control policy, and internal limits of the data source.
The engines that support exports to local files include MaxCompute, EMR, Hologres, StarRocks, ClickHouse, MySQL, Lindorm, SelectDB, and OceanBase.
For example, if you are using DataWorks Standard Edition (limit:
200,000 rows), but 180,000 rows reach the data size limit of1 GB, you can download only1 GBof data. For more information, see SQL Query (legacy).
DataWorks edition | Maximum download rows | Maximum download size |
Basic Edition | 0 | N/A |
Standard Edition |
|
Important If the data size exceeds |
Professional Edition |
| |
Enterprise Edition |
|
When you downgrade your DataWorks edition, the maximum number of rows that you can download changes as follows:
If the download limit of your previous edition is higher than the limit of the new edition, the limit is reduced to the maximum allowed by the new edition.
If the download limit of your previous edition is not higher than the limit of the new edition, the limit remains unchanged.