You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by me...@apache.org on 2022/07/01 15:36:42 UTC

[shardingsphere] branch master updated: Add SQL translator document (#18777)

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

menghaoran pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shardingsphere.git


The following commit(s) were added to refs/heads/master by this push:
     new 2c1ac495391 Add SQL translator document (#18777)
2c1ac495391 is described below

commit 2c1ac495391948300c3f31e02724d192bac9cf18
Author: Liang Zhang <zh...@apache.org>
AuthorDate: Fri Jul 1 23:36:38 2022 +0800

    Add SQL translator document (#18777)
---
 .../builtin-algorithm/sql-translator.cn.md         | 32 ++++++++++++++++++++++
 .../builtin-algorithm/sql-translator.en.md         | 32 ++++++++++++++++++++++
 .../java-api/rules/encrypt.cn.md                   |  2 +-
 .../java-api/rules/encrypt.en.md                   |  2 +-
 .../shardingsphere-jdbc/java-api/rules/ha.cn.md    |  2 +-
 .../shardingsphere-jdbc/java-api/rules/ha.en.md    |  2 +-
 .../shardingsphere-jdbc/java-api/rules/mix.cn.md   |  2 +-
 .../shardingsphere-jdbc/java-api/rules/mix.en.md   |  2 +-
 .../java-api/rules/shadow.cn.md                    |  2 +-
 .../java-api/rules/shadow.en.md                    |  2 +-
 .../java-api/rules/sql-parser.cn.md                |  6 ++--
 .../java-api/rules/sql-parser.en.md                | 18 ++++++------
 .../java-api/rules/sql-translator.cn.md            | 15 ++++++++++
 .../java-api/rules/sql-translator.en.md            | 15 ++++++++++
 .../spring-boot-starter/rules/mix.cn.md            |  2 +-
 .../spring-boot-starter/rules/mix.en.md            |  2 +-
 .../spring-namespace/rules/mix.cn.md               |  2 +-
 .../spring-namespace/rules/mix.en.md               |  2 +-
 .../yaml-config/rules/encrypt.cn.md                |  2 +-
 .../yaml-config/rules/encrypt.en.md                |  2 +-
 .../shardingsphere-jdbc/yaml-config/rules/ha.cn.md |  2 +-
 .../shardingsphere-jdbc/yaml-config/rules/ha.en.md |  2 +-
 .../yaml-config/rules/mix.cn.md                    |  2 +-
 .../yaml-config/rules/mix.en.md                    |  2 +-
 .../yaml-config/rules/shadow.cn.md                 |  2 +-
 .../yaml-config/rules/shadow.en.md                 |  2 +-
 .../yaml-config/rules/sql-parser.cn.md             |  2 +-
 .../yaml-config/rules/sql-parser.en.md             |  2 +-
 .../yaml-config/rules/sql-translator.cn.md         | 13 +++++++++
 .../yaml-config/rules/sql-translator.en.md         | 13 +++++++++
 .../shardingsphere-proxy/yaml-config/rules.cn.md   |  2 ++
 .../shardingsphere-proxy/yaml-config/rules.en.md   |  7 +++--
 32 files changed, 161 insertions(+), 36 deletions(-)

diff --git a/docs/document/content/user-manual/shardingsphere-jdbc/builtin-algorithm/sql-translator.cn.md b/docs/document/content/user-manual/shardingsphere-jdbc/builtin-algorithm/sql-translator.cn.md
new file mode 100644
index 00000000000..c5db5f67736
--- /dev/null
+++ b/docs/document/content/user-manual/shardingsphere-jdbc/builtin-algorithm/sql-translator.cn.md
@@ -0,0 +1,32 @@
++++
+title = "SQL 翻译"
+weight = 7
++++
+
+## 原生 SQL 翻译器
+
+类型:NATIVE
+
+可配置属性:
+
+无
+
+**默认使用的 SQL 翻译器,但目前暂未实现**
+
+## 使用 JooQ 的 SQL 翻译器
+
+类型:JOOQ
+
+可配置属性:
+
+无
+
+**由于需要第三方的 JooQ 依赖,因此 ShardingSphere 默认并未包含相关模块,需要使用下面的 Maven 坐标引用该模块**
+
+```xml
+<dependency>
+    <groupId>org.apache.shardingsphere</groupId>
+    <artifactId>shardingsphere-sql-translator-jooq-provider</artifactId>
+    <version>${project.version}</version>
+</dependency>
+```
diff --git a/docs/document/content/user-manual/shardingsphere-jdbc/builtin-algorithm/sql-translator.en.md b/docs/document/content/user-manual/shardingsphere-jdbc/builtin-algorithm/sql-translator.en.md
new file mode 100644
index 00000000000..cac382fc70f
--- /dev/null
+++ b/docs/document/content/user-manual/shardingsphere-jdbc/builtin-algorithm/sql-translator.en.md
@@ -0,0 +1,32 @@
++++
+title = "SQL Translator"
+weight = 7
++++
+
+## Native SQL translator
+
+Type: NATIVE
+
+Attributes:
+
+None
+
+**Default SQL translator, does not implement yet.**
+
+## JooQ SQL translator
+
+Type: JOOQ
+
+Attributes:
+
+None
+
+**Because of it need JooQ dependency, ShardingSphere does not include the module, please use below XML to import it by Maven.**
+
+```xml
+<dependency>
+    <groupId>org.apache.shardingsphere</groupId>
+    <artifactId>shardingsphere-sql-translator-jooq-provider</artifactId>
+    <version>${project.version}</version>
+</dependency>
+```
diff --git a/docs/document/content/user-manual/shardingsphere-jdbc/java-api/rules/encrypt.cn.md b/docs/document/content/user-manual/shardingsphere-jdbc/java-api/rules/encrypt.cn.md
index f8c40dc9bbd..419a9aa8e0b 100644
--- a/docs/document/content/user-manual/shardingsphere-jdbc/java-api/rules/encrypt.cn.md
+++ b/docs/document/content/user-manual/shardingsphere-jdbc/java-api/rules/encrypt.cn.md
@@ -1,6 +1,6 @@
 +++
 title = "数据加密"
-weight = 4
+weight = 5
 +++
 
 ## 配置入口
diff --git a/docs/document/content/user-manual/shardingsphere-jdbc/java-api/rules/encrypt.en.md b/docs/document/content/user-manual/shardingsphere-jdbc/java-api/rules/encrypt.en.md
index c47eb26a26f..2155b60cecc 100644
--- a/docs/document/content/user-manual/shardingsphere-jdbc/java-api/rules/encrypt.en.md
+++ b/docs/document/content/user-manual/shardingsphere-jdbc/java-api/rules/encrypt.en.md
@@ -1,6 +1,6 @@
 +++
 title = "Encryption"
-weight = 4
+weight = 5
 +++
 
 ## Root Configuration
diff --git a/docs/document/content/user-manual/shardingsphere-jdbc/java-api/rules/ha.cn.md b/docs/document/content/user-manual/shardingsphere-jdbc/java-api/rules/ha.cn.md
index 3db25e52516..de60cc2b1a6 100644
--- a/docs/document/content/user-manual/shardingsphere-jdbc/java-api/rules/ha.cn.md
+++ b/docs/document/content/user-manual/shardingsphere-jdbc/java-api/rules/ha.cn.md
@@ -1,6 +1,6 @@
 +++
 title = "高可用"
-weight = 3
+weight = 4
 +++
 
 ## 配置入口
diff --git a/docs/document/content/user-manual/shardingsphere-jdbc/java-api/rules/ha.en.md b/docs/document/content/user-manual/shardingsphere-jdbc/java-api/rules/ha.en.md
index 8ba76fe10e4..94f39965185 100644
--- a/docs/document/content/user-manual/shardingsphere-jdbc/java-api/rules/ha.en.md
+++ b/docs/document/content/user-manual/shardingsphere-jdbc/java-api/rules/ha.en.md
@@ -1,6 +1,6 @@
 +++
 title = "HA"
-weight = 3
+weight = 4
 +++
 
 ## Root Configuration
diff --git a/docs/document/content/user-manual/shardingsphere-jdbc/java-api/rules/mix.cn.md b/docs/document/content/user-manual/shardingsphere-jdbc/java-api/rules/mix.cn.md
index c09bbe80e04..3e975594853 100644
--- a/docs/document/content/user-manual/shardingsphere-jdbc/java-api/rules/mix.cn.md
+++ b/docs/document/content/user-manual/shardingsphere-jdbc/java-api/rules/mix.cn.md
@@ -1,6 +1,6 @@
 +++
 title = "混合规则"
-weight = 7
+weight = 8
 +++
 
 混合配置的规则项之间的叠加使用是通过数据源名称和表名称关联的。
diff --git a/docs/document/content/user-manual/shardingsphere-jdbc/java-api/rules/mix.en.md b/docs/document/content/user-manual/shardingsphere-jdbc/java-api/rules/mix.en.md
index c9e732c5c33..12f085580cf 100644
--- a/docs/document/content/user-manual/shardingsphere-jdbc/java-api/rules/mix.en.md
+++ b/docs/document/content/user-manual/shardingsphere-jdbc/java-api/rules/mix.en.md
@@ -1,6 +1,6 @@
 +++
 title = "Mixed Rules"
-weight = 7
+weight = 8
 +++
 
 ## Configuration Item Explanation
diff --git a/docs/document/content/user-manual/shardingsphere-jdbc/java-api/rules/shadow.cn.md b/docs/document/content/user-manual/shardingsphere-jdbc/java-api/rules/shadow.cn.md
index ab5e6b859ae..7c31ef7fad7 100644
--- a/docs/document/content/user-manual/shardingsphere-jdbc/java-api/rules/shadow.cn.md
+++ b/docs/document/content/user-manual/shardingsphere-jdbc/java-api/rules/shadow.cn.md
@@ -1,6 +1,6 @@
 +++
 title = "影子库"
-weight = 5
+weight = 6
 +++
 
 ## 配置入口
diff --git a/docs/document/content/user-manual/shardingsphere-jdbc/java-api/rules/shadow.en.md b/docs/document/content/user-manual/shardingsphere-jdbc/java-api/rules/shadow.en.md
index c64c1c73405..c0604f9d222 100644
--- a/docs/document/content/user-manual/shardingsphere-jdbc/java-api/rules/shadow.en.md
+++ b/docs/document/content/user-manual/shardingsphere-jdbc/java-api/rules/shadow.en.md
@@ -1,6 +1,6 @@
 +++
 title = "Shadow DB"
-weight = 5
+weight = 6
 +++
 
 ## Root Configuration
diff --git a/docs/document/content/user-manual/shardingsphere-jdbc/java-api/rules/sql-parser.cn.md b/docs/document/content/user-manual/shardingsphere-jdbc/java-api/rules/sql-parser.cn.md
index 444e04e52a9..86eb04eda7e 100644
--- a/docs/document/content/user-manual/shardingsphere-jdbc/java-api/rules/sql-parser.cn.md
+++ b/docs/document/content/user-manual/shardingsphere-jdbc/java-api/rules/sql-parser.cn.md
@@ -1,6 +1,6 @@
 +++
-title = "SQL解析"
-weight = 6
+title = "SQL 解析"
+weight = 7
 +++
 
 ## 配置入口
@@ -9,7 +9,7 @@ weight = 6
 
 可配置属性:
 
-| *名称*                        | *数据类型*        | *说明*               |
+| *名称*                       | *数据类型*        | *说明*               |
 |-----------------------------|-------------------|---------------------|
 | sqlCommentParseEnabled (?)  | boolean           | 是否解析 SQL 注释     |
 | parseTreeCache (?)          | CacheOption       | 解析语法树本地缓存配置  |
diff --git a/docs/document/content/user-manual/shardingsphere-jdbc/java-api/rules/sql-parser.en.md b/docs/document/content/user-manual/shardingsphere-jdbc/java-api/rules/sql-parser.en.md
index f7a9eec28f0..65f6bc2c970 100644
--- a/docs/document/content/user-manual/shardingsphere-jdbc/java-api/rules/sql-parser.en.md
+++ b/docs/document/content/user-manual/shardingsphere-jdbc/java-api/rules/sql-parser.en.md
@@ -1,16 +1,16 @@
 +++
 title = "SQL Parser"
-weight = 6
+weight = 7
 +++
 
 ## Root Configuration
 
-Class:org.apache.shardingsphere.parser.config.SQLParserRuleConfiguration
+Class: org.apache.shardingsphere.parser.config.SQLParserRuleConfiguration
 
-Attributes:
+Attributes:
 
 | *name*                     | *DataType*      | *Description*                               |
-|----------------------------|-----------------|---------------------------------------------|
+| -------------------------- | --------------- | ------------------------------------------- |
 | sqlCommentParseEnabled (?) | boolean         | Whether to parse SQL comments               |
 | parseTreeCache (?)         | CacheOption     | Parse syntax tree local cache configuration |
 | sqlStatementCache (?)      | CacheOption     | sql statement local cache configuration     |
@@ -19,10 +19,10 @@ Attributes:
 
 Class:org.apache.shardingsphere.sql.parser.api.CacheOption
 
-Attributes:
+Attributes:
 
-| *name*           | *DataType*   | *Description*                                                                              | *Default Value*                                                                                                         |
-|------------------|--------------|--------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------|
-| initialCapacity  | int          | Initial capacity of local cache                                                            | parser syntax tree local cache default value 128, SQL statement cache default value 2000                                |
-| maximumSize(?)   | long         | Maximum capacity of local cache                                                            | The default value of local cache for parsing syntax tree is 1024, and the default value of sql statement cache is 65535 |
+| *name*           | *DataType* | *Description*                   | *Default Value*                                                                                                         |
+| ---------------- | ---------- | ------------------------------- | ----------------------------------------------------------------------------------------------------------------------- |
+| initialCapacity  | int        | Initial capacity of local cache | parser syntax tree local cache default value 128, SQL statement cache default value 2000                                |
+| maximumSize(?)   | long       | Maximum capacity of local cache | The default value of local cache for parsing syntax tree is 1024, and the default value of sql statement cache is 65535 |
 
diff --git a/docs/document/content/user-manual/shardingsphere-jdbc/java-api/rules/sql-translator.cn.md b/docs/document/content/user-manual/shardingsphere-jdbc/java-api/rules/sql-translator.cn.md
new file mode 100644
index 00000000000..97795a3ac53
--- /dev/null
+++ b/docs/document/content/user-manual/shardingsphere-jdbc/java-api/rules/sql-translator.cn.md
@@ -0,0 +1,15 @@
++++
+title = "SQL 翻译"
+weight = 7
++++
+
+## 配置入口
+
+类名称:org.apache.shardingsphere.sqltranslator.api.config.SQLTranslatorRuleConfiguration
+
+可配置属性:
+
+| *名称*                                   | *数据类型* | *说明*                           |
+| --------------------------------------- | --------- | ------------------------------- |
+| type                                    | String    | SQL 翻译器类型                    |
+| useOriginalSQLWhenTranslatingFailed (?) | boolean   | SQL 翻译失败是否使用原始 SQL 继续执行 |
diff --git a/docs/document/content/user-manual/shardingsphere-jdbc/java-api/rules/sql-translator.en.md b/docs/document/content/user-manual/shardingsphere-jdbc/java-api/rules/sql-translator.en.md
new file mode 100644
index 00000000000..0ef4142ff11
--- /dev/null
+++ b/docs/document/content/user-manual/shardingsphere-jdbc/java-api/rules/sql-translator.en.md
@@ -0,0 +1,15 @@
++++
+title = "SQL Translator"
+weight = 7
++++
+
+## Root Configuration
+
+Class: org.apache.shardingsphere.sqltranslator.api.config.SQLTranslatorRuleConfiguration
+
+Attributes:
+
+| *name*                                  | *DataType* | *Description*                                    |
+| --------------------------------------- | ---------- | ------------------------------------------------ |
+| type                                    | String     | SQL translator type                              |
+| useOriginalSQLWhenTranslatingFailed (?) | boolean    | Whether use original SQL when translating failed |
diff --git a/docs/document/content/user-manual/shardingsphere-jdbc/spring-boot-starter/rules/mix.cn.md b/docs/document/content/user-manual/shardingsphere-jdbc/spring-boot-starter/rules/mix.cn.md
index b00c3ffc7de..ab17993eef9 100644
--- a/docs/document/content/user-manual/shardingsphere-jdbc/spring-boot-starter/rules/mix.cn.md
+++ b/docs/document/content/user-manual/shardingsphere-jdbc/spring-boot-starter/rules/mix.cn.md
@@ -1,6 +1,6 @@
 +++
 title = "混合规则"
-weight = 6
+weight = 8
 +++
 
 混合配置的规则项之间的叠加使用是通过数据源名称和表名称关联的。
diff --git a/docs/document/content/user-manual/shardingsphere-jdbc/spring-boot-starter/rules/mix.en.md b/docs/document/content/user-manual/shardingsphere-jdbc/spring-boot-starter/rules/mix.en.md
index b14e73e7de2..11d2530fd3c 100644
--- a/docs/document/content/user-manual/shardingsphere-jdbc/spring-boot-starter/rules/mix.en.md
+++ b/docs/document/content/user-manual/shardingsphere-jdbc/spring-boot-starter/rules/mix.en.md
@@ -1,6 +1,6 @@
 +++
 title = "Mixed Rules"
-weight = 6
+weight = 8
 +++
 
 ## Configuration Item Explanation
diff --git a/docs/document/content/user-manual/shardingsphere-jdbc/spring-namespace/rules/mix.cn.md b/docs/document/content/user-manual/shardingsphere-jdbc/spring-namespace/rules/mix.cn.md
index c510cf911ec..da8b435b739 100644
--- a/docs/document/content/user-manual/shardingsphere-jdbc/spring-namespace/rules/mix.cn.md
+++ b/docs/document/content/user-manual/shardingsphere-jdbc/spring-namespace/rules/mix.cn.md
@@ -1,6 +1,6 @@
 +++
 title = "混合规则"
-weight = 7
+weight = 8
 +++
 
 混合配置的规则项之间的叠加使用是通过数据源名称和表名称关联的。
diff --git a/docs/document/content/user-manual/shardingsphere-jdbc/spring-namespace/rules/mix.en.md b/docs/document/content/user-manual/shardingsphere-jdbc/spring-namespace/rules/mix.en.md
index 91193c2fd01..57f5660c8f9 100644
--- a/docs/document/content/user-manual/shardingsphere-jdbc/spring-namespace/rules/mix.en.md
+++ b/docs/document/content/user-manual/shardingsphere-jdbc/spring-namespace/rules/mix.en.md
@@ -1,6 +1,6 @@
 +++
 title = "Mixed Rules"
-weight = 7
+weight = 8
 +++
 
 ## Configuration Item Explanation
diff --git a/docs/document/content/user-manual/shardingsphere-jdbc/yaml-config/rules/encrypt.cn.md b/docs/document/content/user-manual/shardingsphere-jdbc/yaml-config/rules/encrypt.cn.md
index 5710d5a8d09..13d94e07367 100644
--- a/docs/document/content/user-manual/shardingsphere-jdbc/yaml-config/rules/encrypt.cn.md
+++ b/docs/document/content/user-manual/shardingsphere-jdbc/yaml-config/rules/encrypt.cn.md
@@ -1,6 +1,6 @@
 +++
 title = "数据加密"
-weight = 4
+weight = 5
 +++
 
 ## 配置项说明
diff --git a/docs/document/content/user-manual/shardingsphere-jdbc/yaml-config/rules/encrypt.en.md b/docs/document/content/user-manual/shardingsphere-jdbc/yaml-config/rules/encrypt.en.md
index c9962859f62..1855963d78f 100644
--- a/docs/document/content/user-manual/shardingsphere-jdbc/yaml-config/rules/encrypt.en.md
+++ b/docs/document/content/user-manual/shardingsphere-jdbc/yaml-config/rules/encrypt.en.md
@@ -1,6 +1,6 @@
 +++
 title = "Encryption"
-weight = 4
+weight = 5
 +++
 
 ## Configuration Item Explanation
diff --git a/docs/document/content/user-manual/shardingsphere-jdbc/yaml-config/rules/ha.cn.md b/docs/document/content/user-manual/shardingsphere-jdbc/yaml-config/rules/ha.cn.md
index 62b61b51c7a..20a41e846d8 100644
--- a/docs/document/content/user-manual/shardingsphere-jdbc/yaml-config/rules/ha.cn.md
+++ b/docs/document/content/user-manual/shardingsphere-jdbc/yaml-config/rules/ha.cn.md
@@ -1,6 +1,6 @@
 +++
 title = "高可用"
-weight = 3
+weight = 4
 +++
 
 ## 配置项说明
diff --git a/docs/document/content/user-manual/shardingsphere-jdbc/yaml-config/rules/ha.en.md b/docs/document/content/user-manual/shardingsphere-jdbc/yaml-config/rules/ha.en.md
index 0ded27b110b..70bec70fe07 100644
--- a/docs/document/content/user-manual/shardingsphere-jdbc/yaml-config/rules/ha.en.md
+++ b/docs/document/content/user-manual/shardingsphere-jdbc/yaml-config/rules/ha.en.md
@@ -1,6 +1,6 @@
 +++
 title = "HA"
-weight = 3
+weight = 4
 +++
 
 ```yaml
diff --git a/docs/document/content/user-manual/shardingsphere-jdbc/yaml-config/rules/mix.cn.md b/docs/document/content/user-manual/shardingsphere-jdbc/yaml-config/rules/mix.cn.md
index 3c7861f0c35..b0cbe145df2 100644
--- a/docs/document/content/user-manual/shardingsphere-jdbc/yaml-config/rules/mix.cn.md
+++ b/docs/document/content/user-manual/shardingsphere-jdbc/yaml-config/rules/mix.cn.md
@@ -1,6 +1,6 @@
 +++
 title = "混合规则"
-weight = 6
+weight = 8
 +++
 
 混合配置的规则项之间的叠加使用是通过数据源名称和表名称关联的。
diff --git a/docs/document/content/user-manual/shardingsphere-jdbc/yaml-config/rules/mix.en.md b/docs/document/content/user-manual/shardingsphere-jdbc/yaml-config/rules/mix.en.md
index 85f86a01c90..0cad95983f9 100644
--- a/docs/document/content/user-manual/shardingsphere-jdbc/yaml-config/rules/mix.en.md
+++ b/docs/document/content/user-manual/shardingsphere-jdbc/yaml-config/rules/mix.en.md
@@ -1,6 +1,6 @@
 +++
 title = "Mixed Rules"
-weight = 6
+weight = 8
 +++
 
 
diff --git a/docs/document/content/user-manual/shardingsphere-jdbc/yaml-config/rules/shadow.cn.md b/docs/document/content/user-manual/shardingsphere-jdbc/yaml-config/rules/shadow.cn.md
index 7a926a50dae..ae29dd01fa6 100644
--- a/docs/document/content/user-manual/shardingsphere-jdbc/yaml-config/rules/shadow.cn.md
+++ b/docs/document/content/user-manual/shardingsphere-jdbc/yaml-config/rules/shadow.cn.md
@@ -1,6 +1,6 @@
 +++
 title = "影子库"
-weight = 5
+weight = 6
 +++
 
 ## 配置项说明
diff --git a/docs/document/content/user-manual/shardingsphere-jdbc/yaml-config/rules/shadow.en.md b/docs/document/content/user-manual/shardingsphere-jdbc/yaml-config/rules/shadow.en.md
index 9d7a03dd733..0a94563a05f 100644
--- a/docs/document/content/user-manual/shardingsphere-jdbc/yaml-config/rules/shadow.en.md
+++ b/docs/document/content/user-manual/shardingsphere-jdbc/yaml-config/rules/shadow.en.md
@@ -1,6 +1,6 @@
 +++
 title = "Shadow DB"
-weight = 5
+weight = 6
 +++
 
 ## Configuration Item Explanation
diff --git a/docs/document/content/user-manual/shardingsphere-jdbc/yaml-config/rules/sql-parser.cn.md b/docs/document/content/user-manual/shardingsphere-jdbc/yaml-config/rules/sql-parser.cn.md
index 981173d5fe3..19571526050 100644
--- a/docs/document/content/user-manual/shardingsphere-jdbc/yaml-config/rules/sql-parser.cn.md
+++ b/docs/document/content/user-manual/shardingsphere-jdbc/yaml-config/rules/sql-parser.cn.md
@@ -1,6 +1,6 @@
 +++
 title = "SQL 解析"
-weight = 6
+weight = 7
 +++
 
 ## 配置项说明
diff --git a/docs/document/content/user-manual/shardingsphere-jdbc/yaml-config/rules/sql-parser.en.md b/docs/document/content/user-manual/shardingsphere-jdbc/yaml-config/rules/sql-parser.en.md
index d610c29d359..3388d8f1d60 100644
--- a/docs/document/content/user-manual/shardingsphere-jdbc/yaml-config/rules/sql-parser.en.md
+++ b/docs/document/content/user-manual/shardingsphere-jdbc/yaml-config/rules/sql-parser.en.md
@@ -1,6 +1,6 @@
 +++
 title = "SQL-parser"
-weight = 6
+weight = 7
 +++
 
 ## Configuration Item Explanation
diff --git a/docs/document/content/user-manual/shardingsphere-jdbc/yaml-config/rules/sql-translator.cn.md b/docs/document/content/user-manual/shardingsphere-jdbc/yaml-config/rules/sql-translator.cn.md
new file mode 100644
index 00000000000..afd7f2209f3
--- /dev/null
+++ b/docs/document/content/user-manual/shardingsphere-jdbc/yaml-config/rules/sql-translator.cn.md
@@ -0,0 +1,13 @@
++++
+title = "SQL 翻译"
+weight = 7
++++
+
+## 配置项说明
+
+```yaml
+rules:
+- !SQL_TRANSLATOR
+  type: # SQL 翻译器类型
+  useOriginalSQLWhenTranslatingFailed: # SQL 翻译失败是否使用原始 SQL 继续执行
+```
diff --git a/docs/document/content/user-manual/shardingsphere-jdbc/yaml-config/rules/sql-translator.en.md b/docs/document/content/user-manual/shardingsphere-jdbc/yaml-config/rules/sql-translator.en.md
new file mode 100644
index 00000000000..30ba0a4bc90
--- /dev/null
+++ b/docs/document/content/user-manual/shardingsphere-jdbc/yaml-config/rules/sql-translator.en.md
@@ -0,0 +1,13 @@
++++
+title = "SQL Translator"
+weight = 7
++++
+
+## Configuration Item Explanation
+
+```yaml
+rules:
+- !SQL_TRANSLATOR
+  type: # SQL translator type
+  useOriginalSQLWhenTranslatingFailed: # Whether use original SQL when translating failed
+```
diff --git a/docs/document/content/user-manual/shardingsphere-proxy/yaml-config/rules.cn.md b/docs/document/content/user-manual/shardingsphere-proxy/yaml-config/rules.cn.md
index b1bf53ae32e..cacf3d7446b 100644
--- a/docs/document/content/user-manual/shardingsphere-proxy/yaml-config/rules.cn.md
+++ b/docs/document/content/user-manual/shardingsphere-proxy/yaml-config/rules.cn.md
@@ -14,5 +14,7 @@ ShardingSphere-Proxy 的规则配置与 ShardingSphere-JDBC 一致,具体规
 ## 注意事项
 
 与 ShardingSphere-JDBC 不同的是,以下规则需要配置在 ShardingSphere-Proxy 的 `server.yaml` 中:
+
 * [SQL 解析](/cn/user-manual/shardingsphere-jdbc/yaml-config/rules/sql-parser/)
 * [分布式事务](/cn/user-manual/shardingsphere-jdbc/yaml-config/rules/transaction/)
+* [SQL 翻译](/cn/user-manual/shardingsphere-jdbc/yaml-config/rules/sql-translator/)
diff --git a/docs/document/content/user-manual/shardingsphere-proxy/yaml-config/rules.en.md b/docs/document/content/user-manual/shardingsphere-proxy/yaml-config/rules.en.md
index 67c58a411b5..4caf75453ec 100644
--- a/docs/document/content/user-manual/shardingsphere-proxy/yaml-config/rules.en.md
+++ b/docs/document/content/user-manual/shardingsphere-proxy/yaml-config/rules.en.md
@@ -9,10 +9,13 @@ This section describes how to configure the rules for ShardingSphere-Proxy.
 
 ## Parameters Explained
 
-Rules configuration of ShardingSphere-Proxy is the same as that of ShardingSphere-JDBC. For details, please refer to [ShardingSphere-JDBC Rules Configuration](/en/user-manual/shardingsphere-jdbc/yaml-config/rules/).
+Rules configuration of ShardingSphere-Proxy is the same as that of ShardingSphere-JDBC.
+For details, please refer to [ShardingSphere-JDBC Rules Configuration](/en/user-manual/shardingsphere-jdbc/yaml-config/rules/).
 
 ## Notice
 
-Unlike ShardingSphere-JDBC, the following rules need to be configured in `server.yaml` of ShardingSphere-Proxy:
+Unlike ShardingSphere-JDBC, the following rules need to be configured in `server.yaml` of ShardingSphere-Proxy:
+
 * [SQL Parsing](/en/user-manual/shardingsphere-jdbc/yaml-config/rules/sql-parser/)
 * [Distributed Operations](/en/user-manual/shardingsphere-jdbc/yaml-config/rules/transaction/)
+* [SQL Translator](/cn/user-manual/shardingsphere-jdbc/yaml-config/rules/sql-translator/)