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

cambyzju 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 181933bebae [feat](bi) support default_init_catalog user property for 
external catalog (#2359)
181933bebae is described below

commit 181933bebaea0b2d638b03c2640eee248ad87d15
Author: camby <[email protected]>
AuthorDate: Tue May 13 15:15:52 2025 +0800

    [feat](bi) support default_init_catalog user property for external catalog 
(#2359)
    
    Add docs for pr: https://github.com/apache/doris/pull/49658
    
    ## Versions
    
    - [x] dev
    - [ ] 3.0
    - [ ] 2.1
    - [ ] 2.0
    
    ## Languages
    
    - [x] Chinese
    - [x] English
    
    ## Docs Checklist
    
    - [ ] Checked by AI
    - [ ] Test Cases Built
---
 docs/lakehouse/catalog-overview.md                           | 11 +++++++++++
 .../current/lakehouse/catalog-overview.md                    | 12 ++++++++++++
 2 files changed, 23 insertions(+)

diff --git a/docs/lakehouse/catalog-overview.md 
b/docs/lakehouse/catalog-overview.md
index 3f0ec5116fd..3c662aac790 100644
--- a/docs/lakehouse/catalog-overview.md
+++ b/docs/lakehouse/catalog-overview.md
@@ -154,6 +154,17 @@ jdbc:mysql://host:9030/iceberg_catalog.iceberg_db
 
 The fixed name for the built-in catalog is `internal`. The switching method is 
the same as for external catalogs.
 
+### Default Catalog
+The user attribute `default_init_catalog` is used to set the default catalog 
for a specific user. Once set, when the specified user connects to Doris, they 
will automatically switch to the set catalog.
+
+```sql
+SET PROPERTY default_init_catalog=hive_catalog;
+```
+
+Note 1: If the catalog has been explicitly specified in the MySQL command line 
or JDBC connection strings, then the specified catalog will be used, and the 
`default_init_catalog` user attribute will not take effect.
+Note 2: If the catalog set by the user attribute `default_init_catalog` no 
longer exists, it will automatically switch to the default `internal` catalog.
+Note 3: This feature takes effect starting from version v3.1.x.
+
 ### Simple Query
 
 You can query tables in external catalogs using any SQL statement supported by 
Doris.
diff --git 
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/lakehouse/catalog-overview.md
 
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/lakehouse/catalog-overview.md
index 86a9668a879..b82933ab9c2 100644
--- 
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/lakehouse/catalog-overview.md
+++ 
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/lakehouse/catalog-overview.md
@@ -153,6 +153,18 @@ jdbc:mysql://host:9030/iceberg_catalog.iceberg_db
 
 内置数据目录的固定名称为 `internal`。切换方式和外部数据目录一致。
 
+### 默认数据目录
+
+通过用户属性 `default_init_catalog`,为指定用户设置默认的数据目录。设置完成后,当指定用户连接 Doris 
时,会自动切换到设置的数据目录。
+
+```sql
+SET PROPERTY default_init_catalog=hive_catalog;
+```
+
+注意1:如果 MySQL 命令行或 JDBC 连接串中已经明确指定了数据目录,则以指定的为准,`default_init_catalog` 用户属性不生效;
+注意2:如果用户属性 `default_init_catalog` 设置的数据目录已经不存在,则自动切换到默认的 `internal` 数据目录;
+注意3:该功能从 v3.1.x 版本开始生效;
+
 ### 简单查询
 
 可以通过 Doris 支持的任意 SQL 语句查询外部数据目录中的表。


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

Reply via email to