Top Comments for Compute Tasks

更新时间: 2026-03-26 04:20:51

This topic describes how to customize top comments when creating compute tasks.

Compute Task Types Supported by Various Compute Engines

  • Editable SQL compute task types depend on the offline computing engine of the current tenant.

  • Flink SQL and Flink DataStream types are independent of the offline computing engine. If the current tenant has bound a real-time computing engine, you can edit them.

  • Shell, Python, and Virtual types are independent of the compute engine.

Compute Task Type

Compute Engine Type

MaxCompute SQL

MaxCompute

Spark on MaxCompute

MaxCompute

MapReduce on MaxCompute

MaxCompute

Flink SQL, Flink DataStream

Independent of the offline computing engine. Bind a real-time computing engine.

Shell, Python, Virtual

Independent of the compute engine.

Procedure

  1. On the Dataphin homepage, in the top menu bar, you can select Management Hub > Specification Settings.

  2. In the left navigation pane, select Development Specifications > Top Comments for Compute Tasks.

  3. You can click Edit to customize the top comments for each compute task type that the current tenant's compute engine supports. For details about the default values for top comments of various compute task types, see Default Values for Top Comments of Various Compute Task Types.

    Available system variables:

    • ${author}: The username of the logged-on user when creating a compute task.

    • ${createTime}: The time when creating a compute task, in yyyy-MM-dd HH:mm:ss format.

    • ${taskType}: The task type when creating a compute task. The value matches the task type name in the create menu.

    • ${dbType}: The type of the selected database when creating a database SQL task. The value matches the database type drop-down list.

    • ${comment}: The description when creating a task.

  4. After you edit the settings, click Save.

Default Values for Top Comments of Various Compute Task Types

SQL Class

  • In the Simplified Chinese environment, the default values are as follows.

    —${taskType}
    --********************************************************************--
    --Subject: Which data domain or business scenario the data belongs to, such as transaction domain or operational data reports
    --Description: Description of the data record, such as what the data is, statistic granularity, etc.
    --Creator: ${author}
    --Creation Date: ${createTime}
    --Modification Date     Modifier     Modification Content
    --yyyymmdd     name     comment
    --********************************************************************--
  • In Traditional Chinese and English environments, the default values are empty.

Python

In Simplified Chinese, Traditional Chinese, and English environments, the default values are the same.

#!/usr/bin/env python
# -*- coding: utf-8 -*-
################################################
# Author: ${author}
# Created Time: ${createTime}
################################################
#===============================================

Database SQL

  • In the Simplified Chinese environment, the default values are as follows.

    —Database SQL
    --********************************************************************--
    --You can use -- @@dataphin_sql_begin  <statement> -- @@dataphin_sql_end to declare an independent and complete SQL statement.
    --Subject: Which data domain or business scenario the data belongs to, such as transaction domain or operational data reports
    --Description: Description of the data record, such as what the data is, statistic granularity, etc.
    --Creator: ${author}
    --Creation Date: ${createTime}
    --Modification Date     Modifier     Modification Content
    --yyyymmdd     name     comment
    --********************************************************************--
  • In Traditional Chinese and English environments, the default values are empty.

Flink SQL

  • In the Simplified Chinese environment, the default values are as follows.

    --Stream SQL
    --********************************************************************--
    --Author: ${author}
    --CreateTime: ${createTime}
    --Comment: ${comment}
    --********************************************************************--
  • In Traditional Chinese and English environments, the default values are empty.

Flink DataStream

  • In the Simplified Chinese environment, the default values are as follows.

    --DataStream 
    --********************************************************************--
    --Author: ${author}
    --CreateTime: ${createTime}
    --Comment: ${comment}
    --********************************************************************--
  • In Traditional Chinese and English environments, the default values are empty.

Others

Except for SQL, Python, Database SQL, Flink SQL, and Flink DataStream types, the top comment values for other compute task types are empty by default in Simplified Chinese, Traditional Chinese, and English environments.

上一篇: Coding specifications 下一篇: Data access
阿里云首页 智能数据建设与治理 Dataphin 相关技术圈