Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions docs/lakehouse/sql-convertor/sql-convertor-overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ This feature is currently experimental. If you encounter any issues during use,

- `127.0.0.1:5001` is the IP and port of the SQL dialect conversion service deployment node.

- Starting from version 3.0.7, you can set multiple URL addresses to provide high availability for SQL dialect conversion services. See the **Related Parameters** section for details.

## Use SQL Dialects

Currently supported dialect types include:
Expand Down Expand Up @@ -195,6 +197,14 @@ The following table shows how various data types are displayed in different seri
| `enable_sql_convertor_features` | `set enable_sql_convertor_features="ctas"` | Session variable, user-specified to enable certain special features of sql converter. `ctas`: Allows conversion of the `SELECT` part of a `CTAS` statement. (This variable is supported since Doris 3.0.6 and SQL Convertor 1.0.8.10)|
| `sql_convertor_config` | `set sql_convertor_config = '{"ignore_udf": ["func1", "func2", "fucn3"]}'` | Session variable used to specify that SQL Convertor ignore some UDFs. SQL Convertor will not convert the functions in the list, otherwise it may report an error "Unknown Function". (This variable is supported since Doris 3.0.6 and SQL Convertor 1.0.8.10)|

Starting from version 3.0.7, you can set multiple URL addresses separated by commas:

```
set global sql_converter_service_url = "http://127.0.0.1:5001/api/v1/convert,http://127.0.0.2:5001/api/v1/convert"
```

Doris will prioritize the local service address `127.0.0.1`. When the preferred address is unavailable, it will automatically switch to other available addresses to ensure service availability.

## Best Practices

- Specify functions that do not need to be converted
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@

- `127.0.0.1:5001` 是 SQL 方言转换服务的部署节点 ip 和端口。

- 自 3.0.7 版本开始,允许设置多个 url 地址,已提供高可用的 SQL 方言转换服务。详见 **相关参数** 部分介绍。

## 使用 SQL 方言

目前支持的方言类型包括:
Expand Down Expand Up @@ -195,6 +197,14 @@ SET serde_diactor=<dialect>;
| `enable_sql_convertor_features` | `set enable_sql_convertor_features="ctas"` | 会话变量,用户指定开启 sql convertor 的某些特殊功能。`ctas`: 允许对 `CTAS` 语句中的 `SELECT` 部分进行转换。(该参数自 Doris 3.0.6 和 SQL Convertor 1.0.8.10 支持)|
| `sql_convertor_config` | `set sql_convertor_config = '{"ignore_udf": ["func1", "func2", "fucn3"]}'` | 会话变量,用于指定 SQL Convertor 忽略一些 UDF。在列表中的函数,SQL Convertor 不会进行转换,否则可能报错 "Unknown Function" (该参数自 Doris 3.0.6 和 SQL Convertor 1.0.8.10 支持)|

自 3.0.7 版本开始,允许设置多个 url 地址,以逗号分隔:

```
set global sql_converter_service_url = "http://127.0.0.1:5001/api/v1/convert,"http://127.0.0.2:5001/api/v1/convert""
```

Doris 会优先选择 `127.0.0.1` 的本地服务地址,当优先选择的地址不可用时,会自动切换到其他可用地址,以保证服务的可用性。

## 最佳实践

- 指定不需要转换的函数
Expand Down