System settings

更新时间:
复制 MD 格式

DataWorks provides code templates to help you quickly tag and manage nodes. You can enable the scheduling feature to configure scheduling properties and rerun rules for scheduled tasks. Features such as security isolation, code comparison, and mandatory smoke testing ensure task correctness and security. This topic describes how to configure these features.

Limitations

  • Only Workspace Administrator can configure the system. If this operation is required, you can grant the Workspace Administrator role to a user. For more information, see Add workspace members and manage member roles and permissions.

  • Code template configurations apply only to newly created scheduled tasks.

  • The default scheduling properties apply only to newly created scheduled tasks.

  • Security settings and other options apply only to the current workspace.

Access the settings page

  1. Go to the Workspaces page in the DataWorks console. In the top navigation bar, select a desired region. Find the desired workspace and choose Shortcuts > Data Studio in the Actions column.

  2. At the bottom of the left navigation bar, click image > DataStudio Settings to go to the Setup page.

Configure code templates

A code template defines the default content that is displayed after you create a node. This content can include information such as the node type, the node's creator, and its creation time. This helps you quickly tag the node. Code templates are typically used for business-level node management.

Set a code template

  1. On the Scheduling Settings tab, find the desired Template and click Edit to modify its Node Template.

    For a list of node types that support template configuration, see Node types that support template configuration.
  2. After you finish editing, click Save to confirm the changes.

    You can create a new node of the corresponding type to verify the updated code template.

Available template variables

When you define a code template, you can use variables to record information about newly created nodes of that type. The following variables are supported:

  • ${author}: The node's creator.

    When you create a node, this variable is automatically populated with the current logon account.
  • ${createTime}: The node's creation time.

    When you create a node, this variable is automatically populated with the current system time.

Node types that support template configuration

The following node types in DataWorks support custom code templates:

Engine type

Node type

MaxCompute

MaxCompute Script node

MaxCompute SQL node

MaxCompute MR node

PyODPS 2 node

PyODPS 3 node

Hologres

Hologres SQL node

EMR

EMR Hive node

EMR Impala node

EMR Presto node

EMR Shell node

EMR Spark SQL node

EMR Trino node

CDH

CDH Hive node

CDH Spark SQL node

CDH Presto node

CDH Impala node

ClickHouse

ClickHouse SQL

General

Shell node

HTTP trigger node

Configure default scheduling settings

To run newly created scheduled tasks periodically, you must first enable scheduling so their scheduling configuration can take effect. You can also configure a default resource group, rerun property, auto rerun count, and rerun interval.

These settings apply only to newly created scheduled tasks.
  1. On the Scheduling Settings tab, click Modify to configure the default settings for scheduling-related features.

    Feature

    Description

    Enable scheduling

    When this feature is enabled, scheduled tasks in the current workspace are automatically scheduled and run.

    Note

    If you disable scheduling, tasks that are already generated for the current day still run as expected, but no new scheduled instances are generated for the next day.

    Time Zone for Scheduling

    The scheduling time zone defaults to the time zone of the region where the DataWorks workspace resides. Some DataWorks regions support changing the scheduling time zone. For more information, see Regions that support scheduling time zone changes and How to switch time zones.

    Scheduling Time

    By default, the scheduled time is randomly generated within the range of 00:00 to 00:30. You can customize this time based on your business requirements.

    Resource Group for Scheduling

    The default resource group that is used to run scheduled tasks.

    Resource Group for Data Integration

    The default resource group that is used to run data integration tasks.

    RUN Attribute

    The default rerun policy for scheduled tasks.

    Note

    If the RUN Attribute is set to allow reruns, ensure that your tasks are idempotent to prevent data quality issues from multiple reruns.

    Auto Rerun Times upon Error

    The default number of automatic reruns when a scheduled task fails.

    The value can be set from 1 to 10. A value of 1 means the task is automatically rerun once after a failure, while the maximum value of 10 means it is rerun up to 10 times.

    Rerun interval

    The default interval between automatic reruns for a scheduled task.

    The minimum interval is 1 minute, and the maximum interval is 30 minutes.

  2. Click Save to save the default scheduling settings.

    After you configure the Scheduling Settings, newly created scheduled tasks will use these defaults.

Security settings and other options

DataWorks provides security isolation features, including code and log isolation, code comparison, and mandatory smoke testing. These features ensure task correctness and code reliability. You can configure them on the Security Settings and Others tab.

Enable security isolation for code and logs

When this feature is enabled, users who are not members of the current workspace cannot view its task code or run logs. To grant access, a Workspace Administrator must add the user as a member. For more information, see Add a workspace member and manage member roles and permissions.

Enable baseline display on task deployment

When this feature is enabled, the baseline a task belongs to is displayed when you deploy the task. This helps you determine whether your changes will affect the execution of other tasks in the baseline.

Enable mandatory smoke testing

When this feature is enabled, you cannot deploy a task until it passes smoke testing. For more information, see Deploy a task.

After this feature is enabled, the Production Checker stage of the deployment pipeline shows a Start Smoke Test button and a yellow warning icon to indicate that you must run smoke testing. The Confirm Deployment button in the third stage, Deploy to Production, is unavailable until the smoke test passes.

Enable code comparison

After you enable this feature, you must click Compare published content to review the code before you can deploy a task.

In the Deploy to Production stage of the deployment pipeline, click Compare Published Content to view code comparison details.

Enable dependency check

After you enable this feature, when you deploy a task, the system automatically checks whether the upstream dependencies configured for the current node match the results of the code lineage analysis. The task can be successfully deployed only if they match. For more information, see Scheduling Dependencies.