[typo](docs)Sql blacklist documentation fix (#12376)
Sql blacklist documentationfix
This commit is contained in:
@ -48,13 +48,18 @@ SQL block rule CRUD
|
||||
```sql
|
||||
CREATE SQL_BLOCK_RULE test_rule
|
||||
PROPERTIES(
|
||||
"sql"="select * from order_analysis",
|
||||
"sql"="select \\* from order_analysis",
|
||||
"global"="false",
|
||||
"enable"="true",
|
||||
"sqlHash"=""
|
||||
)
|
||||
```
|
||||
> Notes:
|
||||
>
|
||||
> That the sql statement here does not end with a semicolon
|
||||
|
||||
When we execute the sql that we defined in the rule just now, an exception error will be returned. An example is as follows:
|
||||
|
||||
```sql
|
||||
mysql> select * from order_analysis;
|
||||
ERROR 1064 (HY000): errCode = 2, detailMessage = sql match regex sql block rule: order_analysis_rule
|
||||
|
||||
@ -365,7 +365,7 @@ Cluster situation: The concurrency of Stream load is not affected by cluster siz
|
||||
+ Step 3: Create Import Tasks
|
||||
|
||||
```
|
||||
curl --location-trusted -u user:password -T /home/store_sales -H "label:abc" http://abc.com:8000/api/bj_sales/store_sales/_stream_load
|
||||
curl --location-trusted -u user:password -T /home/store_sales -H "label:abc" http://abc.com:8030/api/bj_sales/store_sales/_stream_load
|
||||
```
|
||||
|
||||
## Common Questions
|
||||
|
||||
@ -64,22 +64,27 @@ Parameter Description:
|
||||
```sql
|
||||
CREATE SQL_BLOCK_RULE test_rule
|
||||
PROPERTIES(
|
||||
"sql"="select \\* from order_analysis;",
|
||||
"sql"="select \\* from order_analysis",
|
||||
"global"="false",
|
||||
"enable"="true"
|
||||
);
|
||||
````
|
||||
|
||||
>Notes:
|
||||
>
|
||||
>That the sql statement here does not end with a semicolon
|
||||
|
||||
When we execute the sql we just defined in the rule, an exception error will be returned. The example is as follows:
|
||||
|
||||
|
||||
```sql
|
||||
select * from order_analysis;
|
||||
ERROR 1064 (HY000): errCode = 2, detailMessage = sql match regex sql block rule: order_analysis_rule
|
||||
````
|
||||
|
||||
|
||||
2. Create test_rule2, limit the maximum number of scanned partitions to 30, and limit the maximum scan base to 10 billion rows. The example is as follows:
|
||||
|
||||
```sql
|
||||
```sql
|
||||
CREATE SQL_BLOCK_RULE test_rule2
|
||||
PROPERTIES (
|
||||
"partition_num" = "30",
|
||||
@ -87,8 +92,7 @@ Parameter Description:
|
||||
"global" = "false",
|
||||
"enable" = "true"
|
||||
);
|
||||
````
|
||||
|
||||
````
|
||||
3. Create SQL BLOCK RULE with special chars
|
||||
|
||||
```sql
|
||||
@ -97,7 +101,6 @@ Parameter Description:
|
||||
(
|
||||
"sql" = "select count\\(1\\) from db1.tbl1"
|
||||
);
|
||||
|
||||
CREATE SQL_BLOCK_RULE test_rule4
|
||||
PROPERTIES
|
||||
(
|
||||
|
||||
@ -48,13 +48,18 @@ under the License.
|
||||
```sql
|
||||
CREATE SQL_BLOCK_RULE test_rule
|
||||
PROPERTIES(
|
||||
"sql"="select * from order_analysis",
|
||||
"sql"="select \\* from order_analysis",
|
||||
"global"="false",
|
||||
"enable"="true",
|
||||
"sqlHash"=""
|
||||
)
|
||||
```
|
||||
>注意:
|
||||
>
|
||||
>这里sql 语句最后不要带分号
|
||||
|
||||
当我们去执行刚才我们定义在规则里的sql时就会返回异常错误,示例如下:
|
||||
|
||||
```sql
|
||||
mysql> select * from order_analysis;
|
||||
ERROR 1064 (HY000): errCode = 2, detailMessage = sql match regex sql block rule: order_analysis_rule
|
||||
|
||||
@ -381,7 +381,7 @@ timeout = 1000s 等于 10G / 10M/s
|
||||
- step3:创建导入任务
|
||||
|
||||
```shell
|
||||
curl --location-trusted -u user:password -T /home/store_sales -H "label:abc" http://abc.com:8000/api/bj_sales/store_sales/_stream_load
|
||||
curl --location-trusted -u user:password -T /home/store_sales -H "label:abc" http://abc.com:8030/api/bj_sales/store_sales/_stream_load
|
||||
```
|
||||
|
||||
## 常见问题
|
||||
|
||||
@ -49,7 +49,7 @@ CREATE SQL_BLOCK_RULE rule_name
|
||||
|
||||
参数说明:
|
||||
|
||||
- sql:匹配规则(基于正则匹配,特殊字符需要转译,如`select *`使用`select \\*`),可选,默认值为 "NULL"
|
||||
- sql:匹配规则(基于正则匹配,特殊字符需要转译,如`select *`使用`select \\*`),可选,默认值为 "NULL", 最后不要带分号
|
||||
- sqlHash: sql hash值,用于完全匹配,我们会在`fe.audit.log`打印这个值,可选,这个参数和sql只能二选一,默认值为 "NULL"
|
||||
- partition_num: 一个扫描节点会扫描的最大partition数量,默认值为0L
|
||||
- tablet_num: 一个扫描节点会扫描的最大tablet数量,默认值为0L
|
||||
@ -68,14 +68,16 @@ CREATE SQL_BLOCK_RULE rule_name
|
||||
"global"="false",
|
||||
"enable"="true"
|
||||
);
|
||||
```
|
||||
|
||||
当我们去执行刚才我们定义在规则里的sql时就会返回异常错误,示例如下:
|
||||
|
||||
```sql
|
||||
mysql> select * from order_analysis;
|
||||
ERROR 1064 (HY000): errCode = 2, detailMessage = sql match regex sql block rule: order_analysis_rule
|
||||
```
|
||||
```
|
||||
|
||||
|
||||
|
||||
当我们去执行刚才我们定义在规则里的sql时就会返回异常错误,示例如下:
|
||||
|
||||
```sql
|
||||
mysql> select * from order_analysis;
|
||||
ERROR 1064 (HY000): errCode = 2, detailMessage = sql match regex sql block rule: order_analysis_rule
|
||||
```
|
||||
|
||||
2. 创建 test_rule2,将最大扫描的分区数量限制在30个,最大扫描基数限制在100亿行,示例如下:
|
||||
|
||||
@ -83,13 +85,14 @@ CREATE SQL_BLOCK_RULE rule_name
|
||||
CREATE SQL_BLOCK_RULE test_rule2
|
||||
PROPERTIES
|
||||
(
|
||||
"partition_num" = "30",
|
||||
"cardinality" = "10000000000",
|
||||
"global" = "false",
|
||||
"enable" = "true"
|
||||
"partition_num" = "30",
|
||||
"cardinality" = "10000000000",
|
||||
"global" = "false",
|
||||
"enable" = "true"
|
||||
);
|
||||
```
|
||||
|
||||
Query OK, 0 rows affected (0.01 sec)
|
||||
```
|
||||
|
||||
3. 创建包含特殊字符的 SQL BLOCK RULE:
|
||||
|
||||
```sql
|
||||
@ -98,7 +101,6 @@ CREATE SQL_BLOCK_RULE rule_name
|
||||
(
|
||||
"sql" = "select count\\(1\\) from db1.tbl1"
|
||||
);
|
||||
|
||||
CREATE SQL_BLOCK_RULE test_rule4
|
||||
PROPERTIES
|
||||
(
|
||||
|
||||
Reference in New Issue
Block a user