Customize the top comments that appear when you create compute tasks.
Supported compute task types by engine
-
Available SQL compute task types depend on the tenant's offline compute engine.
-
Flink SQL and Flink DataStream require a bound real-time compute engine but are independent of the offline engine.
-
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 engine. Requires a bound real-time compute engine. |
|
Shell, Python, Virtual |
Independent of the compute engine. |
Procedure
-
On the Dataphin homepage, in the top menu bar, select Management Hub > Specification Settings.
-
In the left navigation pane, select Development Specifications > Top Comments for Compute Tasks.
-
Click Edit to customize top comments for each supported compute task type. For details about the default values for top comments of various compute task types, see Default top comment values.
Available system variables:
-
${author}: Username of the logged-in user at task creation time. -
${createTime}: Task creation time inyyyy-MM-dd HH:mm:ssformat. -
${taskType}: Task type. Matches the type name in the create menu. -
${dbType}: Database type for database SQL tasks. Matches the database type dropdown. -
${comment}: Task description.
-
-
Click Save.
Default top comment values
SQL Class
-
Simplified Chinese default values:
—${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 --********************************************************************-- -
Traditional Chinese and English default values: empty.
Python
Default values are the same across all languages.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
################################################
# Author: ${author}
# Created Time: ${createTime}
################################################
#===============================================
Database SQL
-
Simplified Chinese default values:
—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 --********************************************************************-- -
Traditional Chinese and English default values: empty.
Flink SQL
-
Simplified Chinese default values:
--Stream SQL --********************************************************************-- --Author: ${author} --CreateTime: ${createTime} --Comment: ${comment} --********************************************************************-- -
Traditional Chinese and English default values: empty.
Flink DataStream
-
Simplified Chinese default values:
--DataStream --********************************************************************-- --Author: ${author} --CreateTime: ${createTime} --Comment: ${comment} --********************************************************************-- -
Traditional Chinese and English default values: empty.
Others
All other compute task types have empty top comments by default.