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

zykkk pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris-website.git


The following commit(s) were added to refs/heads/master by this push:
     new 50cb397914 [fix](jdbc catalog) fix jdbc oracle catalog docs (#900)
50cb397914 is described below

commit 50cb3979145f241b5016a78e9f61e89d40bf41bd
Author: zy-kkk <[email protected]>
AuthorDate: Tue Jul 23 22:21:34 2024 +0800

    [fix](jdbc catalog) fix jdbc oracle catalog docs (#900)
---
 docs/lakehouse/database/oracle.md                  |   2 +-
 .../current/lakehouse/database/oracle.md           |   2 +-
 .../version-2.0/lakehouse/database/oracle.md       |   2 +-
 .../version-2.0/lakehouse/database/sap-hana.md     | 106 +++++++++------------
 .../version-2.1/lakehouse/database/oracle.md       |   2 +-
 .../version-2.0/lakehouse/database/oracle.md       |   2 +-
 .../version-2.1/lakehouse/database/oracle.md       |   2 +-
 7 files changed, 51 insertions(+), 67 deletions(-)

diff --git a/docs/lakehouse/database/oracle.md 
b/docs/lakehouse/database/oracle.md
index 533f303034..8d0bba2a26 100644
--- a/docs/lakehouse/database/oracle.md
+++ b/docs/lakehouse/database/oracle.md
@@ -124,4 +124,4 @@ Doris will automatically add the escape character ("") to 
the field names and ta
 
 2. `Non supported character set (add orai18n.jar in your classpath): ZHS16GBK` 
exception occurs when creating or querying Oracle Catalog
 
-   Download 
[orai18n.jar](https://www.oracle.com/database/technologies/appdev/jdbc-downloads.html)
 and put it in the `custom_lib/` directory under each FE and BE directory (if 
not exists, just create it manually).
+   Download 
[orai18n.jar](https://www.oracle.com/database/technologies/appdev/jdbc-downloads.html)
 and put it in the `custom_lib/` directory under each FE and BE directory (if 
not exists, just create it manually) and restart each FE and BE.
\ No newline at end of file
diff --git 
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/lakehouse/database/oracle.md
 
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/lakehouse/database/oracle.md
index 0255b23c45..5b57b349fd 100644
--- 
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/lakehouse/database/oracle.md
+++ 
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/lakehouse/database/oracle.md
@@ -123,4 +123,4 @@ Apache Doris 会在下发到 Oracle 的查询语句中,自动在字段名与
 
 2. 创建或查询 Oracle Catalog 时出现 `Non supported character set (add orai18n.jar in 
your classpath): ZHS16GBK` 异常
 
-   下载 
[orai18n.jar](https://www.oracle.com/database/technologies/appdev/jdbc-downloads.html)
 并放到 每个 FE 和 BE 的目录下的 `custom_lib/` 目录下(如不存在,手动创建即可)。
+   下载 
[orai18n.jar](https://www.oracle.com/database/technologies/appdev/jdbc-downloads.html)
 并放到 每个 FE 和 BE 的目录下的 `custom_lib/` 目录下(如不存在,手动创建即可)并重启每个 FE 和 BE。
diff --git 
a/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.0/lakehouse/database/oracle.md
 
b/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.0/lakehouse/database/oracle.md
index 8998d9b9d6..911faf13e0 100644
--- 
a/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.0/lakehouse/database/oracle.md
+++ 
b/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.0/lakehouse/database/oracle.md
@@ -123,4 +123,4 @@ Apache Doris 会在下发到 Oracle 的查询语句中,自动在字段名与
 
 2. 创建或查询 Oracle Catalog 时出现 `Non supported character set (add orai18n.jar in 
your classpath): ZHS16GBK` 异常
 
-   下载 
[orai18n.jar](https://www.oracle.com/database/technologies/appdev/jdbc-downloads.html)
 并放到 每个 FE 和 BE 的目录下的 `custom_lib/` 目录下(如不存在,手动创建即可)。
+   下载 
[orai18n.jar](https://www.oracle.com/database/technologies/appdev/jdbc-downloads.html)
 并放到 每个 FE 和 BE 的目录下的 `custom_lib/` 目录下(如不存在,手动创建即可)并重启每个 FE 和 BE。
diff --git 
a/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.0/lakehouse/database/sap-hana.md
 
b/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.0/lakehouse/database/sap-hana.md
index 8998d9b9d6..ee17675b05 100644
--- 
a/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.0/lakehouse/database/sap-hana.md
+++ 
b/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.0/lakehouse/database/sap-hana.md
@@ -1,7 +1,7 @@
 ---
 {
-  "title": "Oracle",
-  "language": "zh-CN"
+   "title": "SAP HANA",
+   "language": "zh-CN"
 }
 ---
 
@@ -24,103 +24,87 @@ specific language governing permissions and limitations
 under the License.
 -->
 
-Apache Doris JDBC Catalog 支持通过标准 JDBC 接口连接 Oracle 数据库。本文档介绍如何配置 Oracle 数据库连接。
+Doris JDBC Catalog 支持通过标准 JDBC 接口连接 SAP HANA 数据库。本文档介绍如何配置 SAP HANA 数据库连接。
 
 ## 使用须知
 
-要连接到 Oracle 数据库,您需要
+要连接到 SAP HANA 数据库,您需要
 
-- Oracle 19c, 18c, 12c, 11g 或 10g。
+- SAP HANA 2.0 或更高版本。
 
-- Oracle 数据库的 JDBC 驱动程序,您可以从 [Maven 
仓库](https://mvnrepository.com/artifact/com.oracle.database.jdbc)下载最新或指定版本的 
Oracle JDBC 驱动程序。
+- SAP HANA 数据库的 JDBC 驱动程序,您可以从 [Maven 
仓库](https://mvnrepository.com/artifact/com.sap.cloud.db.jdbc/ngdbc)下载最新或指定版本的 
SAP HANA JDBC 驱动程序。**推荐使用 ngdbc 2.4.51 以上的版本。**
 
-- Apache Doris 每个 FE 和 BE 节点和 Oracle 服务器之间的网络连接,默认端口为 1521。
+- Doris 每个 FE 和 BE 节点和 SAP HANA 服务器之间的网络连接,默认端口为 30015。
 
-## 连接 Oracle
+## 连接 SAP HANA
 
 ```sql
-CREATE CATALOG oracle PROPERTIES (
+CREATE CATALOG saphana PROPERTIES (
     "type"="jdbc",
-    "user"="root",
-    "password"="secret",
-    "jdbc_url" = "jdbc:oracle:thin:@example.net:1521:orcl",
-    "driver_url" = "ojdbc8.jar",
-    "driver_class" = "oracle.jdbc.driver.OracleDriver"
+    "user"="USERNAME",
+    "password"="PASSWORD",
+    "jdbc_url" = "jdbc:sap://Hostname:Port/?optionalparameters",
+    "driver_url" = "ngdbc-2.4.51.jar",
+    "driver_class" = "com.sap.db.jdbc.Driver"
 )
 ```
 
 :::info 备注
-`jdbc_url` 定义要传递给 JDBC 驱动程序的连接信息和参数。
-使用 Oracle JDBC Thin 驱动程序时,URL 的语法可能会有所不同,具体取决于您的 Oracle 配置。
-例如,如果您要连接到 Oracle SID 或 Oracle 服务名称,则连接 URL 会有所不同。
-有关更多信息,请参阅 [Oracle 数据库 JDBC 
驱动程序文档](https://docs.oracle.com/en/database/oracle/oracle-database/19/jjdbc/data-sources-and-URLs.html)。
-以上示例 URL 连接到名为`orcl`的 Oracle SID。
+有关 SAP HANA JDBC 驱动程序支持的 JDBC URL 格式和参数的更多信息,请参阅 [SAP 
HANA](https://help.sap.com/docs/)。
 :::
 
 ## 层级映射
 
-映射 Oracle 时,Apache Doris 的一个 Database 对应于 Oracle 中的一个 User。而 Apache Doris 的 
Database 下的 Table 则对应于 Oracle 中,该 User 下的有权限访问的 Table。即映射关系如下:
+映射 SAP HANA 时,Doris 的 Database 对应于 SAP HANA 中指定 DataBase(`jdbc_url` 参数中的 
"DATABASE")下的一个 Schema。而 Doris 的 Database 下的 Table 则对应于 SAP HANA 中 Schema 下的 
Tables。即映射关系如下:
 
-|  Apache Doris   |  Oracle  |
+|  Doris   | SAP HANA |
 |:--------:|:--------:|
 | Catalog  | Database |
-| Database |   User   |
+| Database |  Schema  |
 |  Table   |  Table   |
 
 ## 类型映射
 
-### Oracle 到 Apache Doris 类型映射
-
-| Oracle Type                       | Apache Doris Type                        
   | Comment                                                                    
                                                                     |
-|-----------------------------------|--------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------|
-| number(p) / number(p,0)           | TINYINT/SMALLINT/INT/BIGINT/LARGEINT | 
Doris会根据p的大小来选择对应的类型:`p < 3` -> `TINYINT`; `p < 5` -> `SMALLINT`; `p < 10` -> 
`INT`; `p < 19` -> `BIGINT`; `p > 19` -> `LARGEINT` |
-| number(p,s), [ if(s>0 && p>s) ]   | DECIMAL(p,s)                         |   
                                                                                
                                                              |
-| number(p,s), [ if(s>0 && p < s) ] | DECIMAL(s,s)                         |   
                                                                                
                                                              |
-| number(p,s), [ if(s<0) ]          | TINYINT/SMALLINT/INT/BIGINT/LARGEINT | 
s<0的情况下, Doris会将p设置为 p+\|s\|, 并进行和number(p) / number(p,0)一样的映射                  
                                              |
-| number                            |                                      | 
Doris目前不支持未指定p和s的oracle类型                                                       
                                                    |
-| decimal                           | DECIMAL                              |   
                                                                                
                                                              |
-| float/real                        | DOUBLE                               |   
                                                                                
                                                              |
-| DATE                              | DATETIME                             |   
                                                                                
                                                              |
-| TIMESTAMP                         | DATETIME                             |   
                                                                                
                                                              |
-| CHAR/NCHAR                        | STRING                               |   
                                                                                
                                                              |
-| VARCHAR2/NVARCHAR2                | STRING                               |   
                                                                                
                                                              |
-| LONG/ RAW/ LONG RAW/ INTERVAL     | STRING                               |   
                                                                                
                                                              |
-| Other                             | UNSUPPORTED                          |   
                                                                                
                                                              |
+### SAP HANA 到 Doris 类型映射
+
+| SAP HANA Type | Doris Type     | Comment                                     
  |
+|---------------|----------------|-----------------------------------------------|
+| BOOLEAN       | BOOLEAN        |                                             
  |
+| TINYINT       | TINYINT        |                                             
  |
+| SMALLINT      | SMALLINT       |                                             
  |
+| INTERGER      | INT            |                                             
  |
+| BIGINT        | BIGINT         |                                             
  |
+| SMALLDECIMAL  | DECIMAL        |                                             
  |
+| DECIMAL       | DECIMAL/STRING | 将根据Doris DECIMAL字段的(precision, 
scale)选择用何种类型  |
+| REAL          | FLOAT          |                                             
  |
+| DOUBLE        | DOUBLE         |                                             
  |
+| DATE          | DATE           |                                             
  |
+| TIME          | STRING         |                                             
  |
+| TIMESTAMP     | DATETIME       |                                             
  |
+| SECONDDATE    | DATETIME       |                                             
  |
+| VARCHAR       | STRING         |                                             
  |
+| NVARCHAR      | STRING         |                                             
  |
+| ALPHANUM      | STRING         |                                             
  |
+| SHORTTEXT     | STRING         |                                             
  |
+| CHAR          | CHAR           |                                             
  |
+| NCHAR         | CHAR           |                                             
  |
 
 ## 查询优化
 
 ### 统计信息
 
-Apache Doris 会在 Catalog 中维护表的统计信息,以便在执行查询时能够更好地优化查询计划。
+Doris 会在 Catalog 中维护表的统计信息,以便在执行查询时能够更好地优化查询计划。
 
 可以查看 [外表统计信息](../external-statistics) 了解如何收集统计信息。
 
 ### 谓词下推
 
-1. 当执行类似于 `where dt = '2022-01-01'` 这样的查询时,Apache Doris 
能够将这些过滤条件下推到外部数据源,从而直接在数据源层面排除不符合条件的数据,减少了不必要的数据获取和传输。这大大提高了查询性能,同时也降低了对外部数据源的负载。
-
-2. 当变量 `enable_ext_func_pred_pushdown` 设置为true,会将 where 之后的函数条件也下推到外部数据源。
-
-   目前支持下推到 Oracle 的函数有:
-
-   | Function |
-   |:--------:|
-   |   NVL    |
+当执行类似于 `where dt = '2022-01-01'` 这样的查询时,Doris 
能够将这些过滤条件下推到外部数据源,从而直接在数据源层面排除不符合条件的数据,减少了不必要的数据获取和传输。这大大提高了查询性能,同时也降低了对外部数据源的负载。
 
 ### 行数限制
 
-如果在查询中带有 limit 关键字,Apache Doris 会将 limit 转义为 Oracle 的 `rownum` 语法,以减少数据传输量。
+如果在查询中带有 limit 关键字,Doris 会将 limit 下推到 SAP HANA 数据库,以减少数据传输量。
 
 ### 转义字符
 
-Apache Doris 会在下发到 Oracle 的查询语句中,自动在字段名与表名上加上转义符:(""),以避免字段名与表名与 Oracle 
内部关键字冲突。
-
-## 常见问题
-
-1. 创建或查询 Oracle Catalog 时出现 `ONS configuration failed`
-
-   在 be.conf 的 JAVA_OPTS 增加 -Doracle.jdbc.fanEnabled=false 并且升级driver到 
https://repo1.maven.org/maven2/com/oracle/database/jdbc/ojdbc8/19.23.0.0/ojdbc8-19.23.0.0.jar
-
-2. 创建或查询 Oracle Catalog 时出现 `Non supported character set (add orai18n.jar in 
your classpath): ZHS16GBK` 异常
-
-   下载 
[orai18n.jar](https://www.oracle.com/database/technologies/appdev/jdbc-downloads.html)
 并放到 每个 FE 和 BE 的目录下的 `custom_lib/` 目录下(如不存在,手动创建即可)。
+Doris 会在下发到 SAP HANA 的查询语句中,自动在字段名与表名上加上转义符:(""),以避免字段名与表名与 SAP HANA 内部关键字冲突。
diff --git 
a/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/lakehouse/database/oracle.md
 
b/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/lakehouse/database/oracle.md
index 0255b23c45..5b57b349fd 100644
--- 
a/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/lakehouse/database/oracle.md
+++ 
b/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/lakehouse/database/oracle.md
@@ -123,4 +123,4 @@ Apache Doris 会在下发到 Oracle 的查询语句中,自动在字段名与
 
 2. 创建或查询 Oracle Catalog 时出现 `Non supported character set (add orai18n.jar in 
your classpath): ZHS16GBK` 异常
 
-   下载 
[orai18n.jar](https://www.oracle.com/database/technologies/appdev/jdbc-downloads.html)
 并放到 每个 FE 和 BE 的目录下的 `custom_lib/` 目录下(如不存在,手动创建即可)。
+   下载 
[orai18n.jar](https://www.oracle.com/database/technologies/appdev/jdbc-downloads.html)
 并放到 每个 FE 和 BE 的目录下的 `custom_lib/` 目录下(如不存在,手动创建即可)并重启每个 FE 和 BE。
diff --git a/versioned_docs/version-2.0/lakehouse/database/oracle.md 
b/versioned_docs/version-2.0/lakehouse/database/oracle.md
index 70e6ce665b..68598151fe 100644
--- a/versioned_docs/version-2.0/lakehouse/database/oracle.md
+++ b/versioned_docs/version-2.0/lakehouse/database/oracle.md
@@ -124,4 +124,4 @@ Doris will automatically add the escape character ("") to 
the field names and ta
 
 2. `Non supported character set (add orai18n.jar in your classpath): ZHS16GBK` 
exception occurs when creating or querying Oracle Catalog
 
-   Download 
[orai18n.jar](https://www.oracle.com/database/technologies/appdev/jdbc-downloads.html)
 and put it in the `custom_lib/` directory under each FE and BE directory (if 
not exists, just create it manually).
+   Download 
[orai18n.jar](https://www.oracle.com/database/technologies/appdev/jdbc-downloads.html)
 and put it in the `custom_lib/` directory under each FE and BE directory (if 
not exists, just create it manually) and restart each FE and BE.
\ No newline at end of file
diff --git a/versioned_docs/version-2.1/lakehouse/database/oracle.md 
b/versioned_docs/version-2.1/lakehouse/database/oracle.md
index af6367b1aa..1ef211b304 100644
--- a/versioned_docs/version-2.1/lakehouse/database/oracle.md
+++ b/versioned_docs/version-2.1/lakehouse/database/oracle.md
@@ -124,4 +124,4 @@ Doris will automatically add the escape character ("") to 
the field names and ta
 
 2. `Non supported character set (add orai18n.jar in your classpath): ZHS16GBK` 
exception occurs when creating or querying Oracle Catalog
 
-   Download 
[orai18n.jar](https://www.oracle.com/database/technologies/appdev/jdbc-downloads.html)
 and put it in the `custom_lib/` directory under each FE and BE directory (if 
not exists, just create it manually).
+   Download 
[orai18n.jar](https://www.oracle.com/database/technologies/appdev/jdbc-downloads.html)
 and put it in the `custom_lib/` directory under each FE and BE directory (if 
not exists, just create it manually) and restart each FE and BE.
\ No newline at end of file


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to