This is an automated email from the ASF dual-hosted git repository.

fanjia pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/seatunnel-web.git


The following commit(s) were added to refs/heads/main by this push:
     new 2c9d9e1a [Improvement][Seatunnel-web] Document Placeholder feature 
(#230)
2c9d9e1a is described below

commit 2c9d9e1a0196ab75a42993f3f57be3aa0781e198
Author: Mohammad Arshad <ars...@apache.org>
AuthorDate: Wed Oct 16 14:06:23 2024 +0530

    [Improvement][Seatunnel-web] Document Placeholder feature (#230)
---
 README.md    | 19 +++++++++++++++++++
 README_CN.md | 27 +++++++++++++++++++++++++++
 2 files changed, 46 insertions(+)

diff --git a/README.md b/README.md
index dcba252e..09087d07 100644
--- a/README.md
+++ b/README.md
@@ -206,6 +206,25 @@ Now ,let me show you how to use it.
 #### Virtual Tables manage
 ![img.png](docs/images/VirtualImage.png)
 
+### Features
+
+#### 1 Configuration Placeholders
+Placeholders are used in configurations to represent values that will be 
dynamically substituted at runtime or during processing.
+They enhance configuration flexibility and reusability by allowing specific 
values to be injected as needed.
+
+##### 1.1 Placeholder Format
+\${p1:v1}: p1 is a placeholder for a configuration value. If the p1 value is 
not provided at execution time, the default value v1 is used.
+\${p1}: If the p1 value is not provided at execution time, the execution will 
fail with an error.
+
+##### 1.2 Escaping Placeholders
+To escape placeholders, add a backslash before the placeholder. For example, 
\\\${p1:v1} or \\\${p1}.
+This is necessary when you want to pass the placeholder as-is to the engine 
without replacing the value in Seatunnel-web.
+
+##### 1.3 How Seatunnel-web Handles Placeholders
+During job execution, before sending the job to the engine, Seatunnel-web 
replaces the actual values in placeholders. This ensures that the actual 
executed job is recorded in Seatunnel-web history.
+
+NOTE: This feature is currently useful when execution is done through the API. 
The UI does not provide an option to pass placeholder values.
+
 ### Upgrades
 #### 1. Upgrade from 1.0.1 or before to 1.0.2 or after.
 Execute the following SQL to upgrade the database:
diff --git a/README_CN.md b/README_CN.md
index 3c80270b..ed6eb66f 100644
--- a/README_CN.md
+++ b/README_CN.md
@@ -205,3 +205,30 @@ sh bin/seatunnel-backend-daemon.sh start
 
 #### 虚拟表
 ![img.png](docs/images/VirtualImage.png)
+
+### 功能
+
+#### 1 配置占位符
+占位符用于配置中,表示将在运行时或处理过程中动态替换的值。
+它们允许根据需要注入特定值,从而增强配置灵活性和可重用性。
+
+#### 1.1 占位符格式
+\${p1:v1}:p1 是配置值的占位符。如果在执行时未提供 p1 值,则使用默认值 v1。
+\${p1}:如果在执行时未提供 p1 值,则执行将失败并出现错误。
+
+#### 1.2 转义占位符
+要转义占位符,请在占位符前添加反斜杠。例如,\\\${p1:v1} 或 \\\${p1}。
+当您想将占位符按原样传递给引擎而不替换 Seatunnel-web 中的值时,这是必需的。
+
+##### 1.3 Seatunnel-web 如何处理占位符
+在作业执行期间,在将作业发送到引擎之前,Seatunnel-web 会替换占位符中的实际值。这可确保实际执行的作业记录在 Seatunnel-web 
历史记录中。
+
+注意:此功能目前在通过 API 执行时很有用。UI 不提供传递占位符值的选项。
+
+### 升级
+#### 1. 从 1.0.1 或之前版本升级到 1.0.2 或之后版本。
+执行以下 SQL 升级数据库:
+
+```ALTER TABLE `t_st_job_instance` ADD COLUMN `error_message` varchar(4096) 
CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL;```
+
+

Reply via email to