This is an automated email from the ASF dual-hosted git repository.
zyk pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/iotdb.git
The following commit(s) were added to refs/heads/master by this push:
new 3bf31903e4 [IOTDB-3565] Update User-Guide for Dynamic Template (#9672)
3bf31903e4 is described below
commit 3bf31903e49344b9f654a2a34563e4e52a0d7f0f
Author: Marcos_Zyk <[email protected]>
AuthorDate: Sun Apr 23 14:00:31 2023 +0800
[IOTDB-3565] Update User-Guide for Dynamic Template (#9672)
---
docs/UserGuide/Operate-Metadata/Template.md | 15 ++++++++++++++-
docs/zh/UserGuide/Operate-Metadata/Template.md | 14 ++++++++++++++
2 files changed, 28 insertions(+), 1 deletion(-)
diff --git a/docs/UserGuide/Operate-Metadata/Template.md
b/docs/UserGuide/Operate-Metadata/Template.md
index 194bb4ecd9..25768b4c21 100644
--- a/docs/UserGuide/Operate-Metadata/Template.md
+++ b/docs/UserGuide/Operate-Metadata/Template.md
@@ -55,6 +55,7 @@ After a schema template is created, it should be set to
specific path before cre
**It is recommended to set schema template to database path. It is not
suggested to set schema template to some path above database**
+**It is forbidden to create timeseries under a path setting schema template.
Schema template shall not be set on a prefix path of an existing timeseries.**
The SQL Statement for setting schema template is as follow:
@@ -225,4 +226,16 @@ The SQL Statement for dropping schema template is as
follow:
IoTDB> drop schema template t1
```
-**Attention**: Dropping an already set template is not supported.
\ No newline at end of file
+**Attention**: Dropping an already set template is not supported.
+
+## Alter Schema Template
+
+In a scenario where measurements need to be added, you can modify the schema
template to add measurements to all devices using the schema template.
+
+The SQL Statement for altering schema template is as follow:
+
+```shell
+IoTDB> alter schema template t1 add (speed FLOAT encoding=RLE, FLOAT TEXT
encoding=PLAIN compression=SNAPPY)
+```
+
+**When executing data insertion to devices with schema template set on related
prefix path and there are measurements not present in this schema template, the
measurements will be auto added to this schema template.**
\ No newline at end of file
diff --git a/docs/zh/UserGuide/Operate-Metadata/Template.md
b/docs/zh/UserGuide/Operate-Metadata/Template.md
index 6ee5f07143..37f21538e8 100644
--- a/docs/zh/UserGuide/Operate-Metadata/Template.md
+++ b/docs/zh/UserGuide/Operate-Metadata/Template.md
@@ -55,6 +55,8 @@ IoTDB> create schema template t2 aligned (lat FLOAT
encoding=Gorilla, lon FLOAT
**推荐将模板挂载在 database 节点上,不建议将模板挂载到 database 上层的节点上。**
+**模板挂载路径下禁止创建普通序列,已创建了普通序列的前缀路径上不允许挂载模板。**
+
挂载元数据模板的 SQL 语句如下所示:
```shell
@@ -224,3 +226,15 @@ IoTDB> drop schema template t1
```
**注意**:不支持删除已经挂载的模板,需在删除操作前保证该模板卸载成功。
+
+### 修改元数据模板
+
+在需要新增物理量的场景中,可以通过修改元数据模板来给所有已激活该模板的设备新增物理量。
+
+修改元数据模板的 SQL 语句如下所示:
+
+```shell
+IoTDB> alter schema template t1 add (speed FLOAT encoding=RLE, FLOAT TEXT
encoding=PLAIN compression=SNAPPY)
+```
+
+**向已挂载模板的路径下的设备中写入数据,若写入请求中的物理量不在模板中,将自动扩展模板。**