From 0ca7de3d4db3eab755b337b1975ae5577c0b0a90 Mon Sep 17 00:00:00 2001
From: Quan <787025321@qq.com>
Date: Tue, 21 Jan 2025 18:09:35 +0800
Subject: [PATCH 1/5] feat: text
---
.../00-editions/02-dc/01-platforms.md | 6 +-
.../00-editions/02-dc/02-editions.md | 3 +-
.../00-editions/02-dc/03-pricing.md | 112 +++++++++++++++---
.../guides/00-overview/00-editions/index.md | 32 ++++-
docs/en/guides/00-overview/index.md | 16 ++-
docs/en/guides/20-cloud/00-new-account.md | 12 +-
i18n/en/code.json | 52 ++++++++
i18n/zh/code.json | 58 ++++++++-
src/components/DocsOverview/index.tsx | 82 ++++++++++++-
.../DocsOverview/styles.module.scss | 12 ++
10 files changed, 358 insertions(+), 27 deletions(-)
diff --git a/docs/en/guides/00-overview/00-editions/02-dc/01-platforms.md b/docs/en/guides/00-overview/00-editions/02-dc/01-platforms.md
index ad59aba63d..f201b056a9 100644
--- a/docs/en/guides/00-overview/00-editions/02-dc/01-platforms.md
+++ b/docs/en/guides/00-overview/00-editions/02-dc/01-platforms.md
@@ -9,7 +9,8 @@ Databend Cloud is a cloud-native solution that currently supports [Amazon S3](ht
![alt text](/img/cloud/dc-platform-en.png)
:::note
-Databend Cloud plans to expand its support for additional cloud platforms and regions. If your project requires support for a specific cloud platform or region, please click the **Contact Sales** button on the top right corner of the Databend Cloud homepage to get in touch with the Databend Cloud team.
+To ensure efficient and stable data synchronization and import, we strongly recommend choosing a cloud service that matches the cloud provider and region you are currently using. This will help effectively avoid potential network delays and data loss risks associated with cross-network data transfers, ensuring the security and smoothness of the data transmission process, while significantly improving the efficiency and stability of data synchronization and import.
+Databend Cloud plans to expand support for more cloud providers and regions. If your current cloud provider or region is not supported, please click [Contact Sales](https://www.databend.com/contact-us/) to get in touch with the Databend Cloud team.
:::
When you sign up for a Databend Cloud account, you will need to select a cloud platform and region. Once the account is successfully created, the selected cloud platform and region cannot be changed.
@@ -23,7 +24,8 @@ Databend Cloud 是一个云原生解决方案,目前支持以下区域的 [Ama
![alt text](/img/cloud/dc-platform.png)
:::note
-Databend Cloud 计划扩展对更多云平台和区域的支持。如果您的项目需要特定云平台或区域的支持,请点击 Databend Cloud 主页右上角的 **联系销售** 按钮,与 Databend Cloud 团队取得联系。
+为了确保数据同步导入的高效与稳定,强烈建议您选择与当前正在使用的云厂商以及区域(Region)完全一致的云服务。这样做可以有效规避跨公网数据传输可能带来的网络延迟、数据丢失风险,保障数据传输过程的安全与流畅,大幅提升数据同步导入的效率和稳定性。
+Databend Cloud 计划扩展对更多云厂商和区域的支持。如果没有您目前所使用的云厂商或者区域,请点击[联系销售](https://www.databend.cn/contact-us/),与 Databend Cloud 团队取得联系。
:::
您在开通 Databend Cloud 账号时需要选定一个云厂商及地域。开通成功后,选定的云厂商及地域暂不支持修改。
diff --git a/docs/en/guides/00-overview/00-editions/02-dc/02-editions.md b/docs/en/guides/00-overview/00-editions/02-dc/02-editions.md
index b120b6ce6b..c3f11deeab 100644
--- a/docs/en/guides/00-overview/00-editions/02-dc/02-editions.md
+++ b/docs/en/guides/00-overview/00-editions/02-dc/02-editions.md
@@ -40,7 +40,8 @@ tbody={[
width={['67%', '11%', '11%', '11%']}
thead={['Features', 'Personal', 'Business', 'Dedicated']}
tbody={[
-['SOC 1 Type I certification.', '✓', '✓', '✓'],
+['SOC 2 Type II certification.', '✓', '✓', '✓'],
+['GDPR', '✓', '✓', '✓'],
['Automatic encryption of all data.', '✓', '✓', '✓'],
['Object-level access control.', '✓', '✓', '✓'],
['Standard Time Travel (up to 1 day) for accessing/restoring modified and deleted data.', '✓', '✓', '✓'],
diff --git a/docs/en/guides/00-overview/00-editions/02-dc/03-pricing.md b/docs/en/guides/00-overview/00-editions/02-dc/03-pricing.md
index ff6265778f..4704b863e2 100644
--- a/docs/en/guides/00-overview/00-editions/02-dc/03-pricing.md
+++ b/docs/en/guides/00-overview/00-editions/02-dc/03-pricing.md
@@ -20,13 +20,13 @@ cn=
计算集群的大小指的是它能够处理的并发查询的最大数量,价格根据不同的大小和所使用的 Databend Cloud 版本而有所不同。
-| 大小 | 最大并发 | 每小时费用 (标准版) | 每小时费用 (商业版) |
-| ------ | -------- | ------------------- | ------------------- |
-| XSmall | 2 | ¥ 3.00 | ¥ 4.50 |
-| Small | 4 | ¥ 6.00 | ¥ 9.00 |
-| Medium | 8 | ¥ 12.00 | ¥ 18.00 |
-| Large | 16 | ¥ 24.00 | ¥ 36.00 |
-| XLarge | 32 | ¥ 48.00 | ¥ 72.00 |
+| 大小 | 最大并发 | 每小时费用 (基础版) | 每小时费用 (商业版) | 每秒费用 (基础版) | 每秒费用 (商业版) |
+| ------ | -------- | ------------------- | ------------------- | ----------------- | ----------------- |
+| XSmall | 2 | ¥ 3.00 | ¥ 4.50 | ¥ 0.000833333 | ¥ 0.00125 |
+| Small | 4 | ¥ 6.00 | ¥ 9.00 | ¥ 0.001666667 | ¥ 0.0025 |
+| Medium | 8 | ¥ 12.00 | ¥ 18.00 | ¥ 0.003333333 | ¥ 0.005 |
+| Large | 16 | ¥ 24.00 | ¥ 36.00 | ¥ 0.006666667 | ¥ 0.01 |
+| XLarge | 32 | ¥ 48.00 | ¥ 72.00 | ¥ 0.013333333 | ¥ 0.02 |
暂停的计算集群不会消耗任何资源。默认情况下,Databend Cloud 会在五分钟不活动后自动暂停计算集群以节省资源和成本。您可以根据自己的偏好调整或禁用此自动暂停功能。
@@ -39,6 +39,44 @@ cn=
| 标准版 | ¥ 160.00 |
| 商业版 | ¥ 160.00 |
+## 例子 1:
+
+某用户使用商业版 XSmall 集群,偶尔查询一次数据,此次查询耗时 5 分 20 秒,数据存储容量为 100G,当天的费用是:
+
+### 计算费用:
+
+0.00125*(5*60+20)=0.4 元(XSmall 集群 1 秒计费为 0.00125,时长 5 分 20 秒)
+
+### 存储费用:
+
+160/1024/30\*100=0.52 元(存储单价:160 元/T/月,1T=1024G,30 天)
+
+### 该天总费用:计算费用+存储费用=0.4+0.52=0.92 元
+
+该月按照每天一次的查询频率,总费用为:0.92\*30=27.6 元
+(注:因云服务 API 调用次数太少,几乎为 0,所以不产生云服务费,每天有大量频繁查询才会产生服务费,如例子 2)
+
+## 例子 2:
+
+某用户使用商业版 XSmall 集群,将数据持续导入 Dataend Cloud。期间,计算集群 24 小时不间断运行,存储数据量为 1T。为实现数据的动态持续加载,该用户运用了 Databend Cloud 提供的 Task 服务,设置任务为每分钟执行一次,将数据加载至 Databend Cloud 中,预计调用 API 次数为 10 万次。当天产生的费用是:
+
+### 计算费用:
+
+0.00125*3600*24=4.5\*24=108 元(XSmall 集群 1 秒计费为 0.00125,1 小时为 3600 秒,24 小时)
+
+### 存储费用:
+
+160/30\*1=5.33 元 (存储单价:160 元/T/月,1 个月为 30 天)
+
+### 云服务费用:
+
+4.5\*10=45 元(4.5 元/1 万次 API 调用,10 万次)
+
+### 该天总费用:
+
+计算费用+存储费用+云服务费用=108+5.33+45=158.33 元
+该月按照 24 小时持续数据导入,总费用为:158.33\*30=4749.9 元
+
### 云服务定价
云服务费目前包括 API 请求的费用。每次您使用 Databend Cloud 运行 SQL 查询时,都会通过 [Databend HTTP 处理器](/developer/apis/http) 向 `databend-query` 发送一个 REST API 请求。在标准版中,每 10,000 次 API 请求收费 3 元,而在商业版中,每 10,000 次 API 请求收费 4.5 元。
@@ -72,13 +110,13 @@ Your warehouses incur costs when they are running (specifically, when in the Run
The size of a warehouse refers to the maximum number of concurrent queries it can handle, and prices vary based on the different sizes available and the Databend Cloud edition you use.
-| Size | Max. Concurrency | Hourly Cost (Personal) | Hourly Cost (Business) |
-| ------ | ---------------- | ---------------------- | ---------------------- |
-| XSmall | 2 | $1.00 | $1.50 |
-| Small | 4 | $2.00 | $3.00 |
-| Medium | 8 | $4.00 | $6.00 |
-| Large | 16 | $8.00 | $12.00 |
-| XLarge | 32 | $16.00 | $24.00 |
+| Size | Max. Concurrency | Hourly Cost (Personal) | Hourly Cost (Business) | Per-Second Cost (Personal) | Per-Second Cost (Business) |
+| ------ | ---------------- | ---------------------- | ---------------------- | -------------------------- | -------------------------- |
+| XSmall | 2 | $1.00 | $1.50 | $0.000277778 | $0.000416667 |
+| Small | 4 | $2.00 | $3.00 | $0.000555556 | $0.000833333 |
+| Medium | 8 | $4.00 | $6.00 | $0.001111111 | $0.001666667 |
+| Large | 16 | $8.00 | $12.00 | $0.002222222 | $0.003333333 |
+| XLarge | 32 | $16.00 | $24.00 | $0.004444444 | $0.006666667 |
A suspended warehouse does not consume any resources. By default, Databend Cloud automatically suspends a warehouse after five minutes of inactivity to save resources and costs. You can adjust or disable this automatic suspension feature according to your preferences.
@@ -91,6 +129,52 @@ Your data in Databend Cloud is physically stored in Amazon S3. Storage costs in
| Personal Edition | $23.00 |
| Business Edition | $23.00 |
+## Example-1:
+
+A user is using an XSmall warehouse (Business) and occasionally queries data. This specific query took 5 minutes and 20 seconds, and the data storage size is 100GB. The charges for the day are as follows:
+
+### Compute charges:
+
+0.000416667 \* (5 \* 60 + 20) = $0.13
+(XSmall cluster charges 0.00125 RMB per second, and the query duration is 5 minutes and 20 seconds)
+
+### Storage charges:
+
+23 / 1024 / 30 \* 100 = $0.75
+(Storage price is $23 per TB/month, 1TB = 1024GB, 30 days in a month)
+
+### Total daily cost:
+
+Compute charges + Storage charges = $0.13 + $0.75 = $0.88
+Assuming one query per day, the total cost for the month would be:
+0.88 \* 30 = $26.4
+(Note: Because the API calls are infrequent, the cloud service fee is negligible. Only frequent queries will generate cloud service fees, as shown in Example 2.)
+
+## Example-2:
+
+A user is using an XSmall warehouse (Business) to continuously import data into Databend Cloud. The warehouse runs 24 hours a day, and the data storage is 1TB. To facilitate continuous data loading, the user has set up a task to run every minute, loading data into Databend Cloud. The estimated number of API calls is 100,000. The charges for the day are as follows:
+
+### Compute charges:
+
+1.50 \* 24 = $36
+(XSmall cluster charges $1.50 per hour)
+
+### Storage charges:
+
+23 / 30 = $0.77
+(Storage price is $23 per TB/month, 1TB = 1024GB, 30 days in a month)
+
+### Cloud service charges:
+
+2 \* 10 = $20
+($2 per 10,000 API calls)
+
+### Total daily cost:
+
+Compute charges + Storage charges + Cloud service charges = 36 + 0.77 + 20 = $56.77
+Assuming 24-hour continuous data import throughout the month, the total cost for the month would be:
+56.77 \* 30 = $1703.1
+
### Cloud Service Pricing
The cloud service fee currently includes fees for the API requests. Each time you run a SQL query with Databend Cloud, a REST API request is sent to the `databend-query` through the [Databend HTTP handler](/developer/apis/http). In the Personal Edition, you are billed $1 for every 10,000 API requests, while in the Business Edition, the cost is $2 for every 10,000 API requests.
diff --git a/docs/en/guides/00-overview/00-editions/index.md b/docs/en/guides/00-overview/00-editions/index.md
index 7cac17e633..76091beb97 100644
--- a/docs/en/guides/00-overview/00-editions/index.md
+++ b/docs/en/guides/00-overview/00-editions/index.md
@@ -1,8 +1,38 @@
---
title: Databend Products
---
+
import IndexOverviewList from '@site/src/components/IndexOverviewList';
+import LanguageDocs from '@site/src/components/LanguageDocs';
Databend offers a diverse range of products tailored to meet a wide array of needs. Click the links below to explore each product in detail:
-
\ No newline at end of file
+
+
+## Comparison of Databend Products
+
+
diff --git a/docs/en/guides/00-overview/index.md b/docs/en/guides/00-overview/index.md
index 5134f067eb..2f1dcf7520 100644
--- a/docs/en/guides/00-overview/index.md
+++ b/docs/en/guides/00-overview/index.md
@@ -5,8 +5,22 @@ slug: /
import DocsOverview from '@site/src/components/DocsOverview'
import Speaker from '@site/src/components/Speaker'
+import LanguageDocs from '@site/src/components/LanguageDocs';
-Welcome to the Databend (pronounced as /ˈdeɪtəˌbɛnd/) documentation. Databend is an affordable, Snowflake-like cloud data warehouse. You can choose to self-host Databend as a completely free and open-source solution, or opt for the convenience of getting started right away with Databend Cloud.
+Welcome to the Databend (pronounced as /ˈdeɪtəˌbɛnd/) documentation.
+
diff --git a/docs/en/guides/20-cloud/00-new-account.md b/docs/en/guides/20-cloud/00-new-account.md
index 1ab81ffd04..53af6ccfd8 100644
--- a/docs/en/guides/20-cloud/00-new-account.md
+++ b/docs/en/guides/20-cloud/00-new-account.md
@@ -7,7 +7,7 @@ title: Getting Started
import StepsWrap from '@site/src/components/StepsWrap';
import StepContent from '@site/src/components/Steps/step-content';
-This topic outlines the steps for applying for beta access and signing up for a Databend Cloud account.
+Databend Cloud is a SaaS-based service powered by the Databend Enterprise Edition core engine, offered to users through a public cloud platform. It requires no maintenance or installation; users can simply register an account and start using the service.
:::tip
Databend Cloud fully supports various popular browsers, including Chrome, Microsoft Edge, Firefox, Opera, and Safari.
@@ -55,11 +55,14 @@ Please note that this step is visible only to users who sign up for their organi
-要开通 Databend Cloud 服务,您需要先获取 Databend Cloud,然后创建一个 Databend Cloud 账号。
-## 获取 Databend Cloud
+## Databend Cloud 介绍
-您可以通过以下方式获取 Databend Cloud:
+Databend Cloud 是以 Databend 企业版为核心引擎,提供 SaaS 化服务,以公有云云平台的形式提供给用户使用,免运维免安装,注册账号即可使用。
+
+## 使用 Databend Cloud
+
+您可以通过以下方式使用 Databend Cloud:
- 在 [Databend Cloud 官网](https://www.databend.cn/)直接注册
- 在[阿里云市场](https://www.aliyun.com/search?k=%E4%BA%91%E5%8E%9F%E7%94%9F%E6%95%B0%E6%8D%AE%E4%BB%93%E5%BA%93%20Databend%20Cloud&scene=market)购买 Databend Cloud
@@ -145,4 +148,5 @@ Please note that this step is visible only to users who sign up for their organi
3. 选择云提供商和地区。请注意,此步骤仅对注册其组织的用户可见。完成设置后,点击“创建”。
![Alt text](@site/static/img/documents_cn/getting-started/02.png)
+
diff --git a/i18n/en/code.json b/i18n/en/code.json
index a3c9d779b0..4df676cd29 100644
--- a/i18n/en/code.json
+++ b/i18n/en/code.json
@@ -676,5 +676,57 @@
"FAQ": {
"message": "FAQ",
"description": "FAQ"
+ },
+ "Product Features": {
+ "message": "Product Features",
+ "description": "Product Features"
+ },
+ "Serverless Elastic Architecture": {
+ "message": "Serverless Elastic Architecture",
+ "description": "Title for serverless elastic architecture card"
+ },
+ "Stateless compute nodes with serverless elasticity enable rapid scaling and recovery based on workload.": {
+ "message": "Stateless compute nodes with serverless elasticity enable rapid scaling and recovery based on workload.",
+ "description": "Description for serverless elastic architecture card"
+ },
+ "Object Storage & HDFS": {
+ "message": "Object Storage & HDFS",
+ "description": "Title for object storage and HDFS card"
+ },
+ "Stores all data in object storage to reduce costs, while supporting HDFS for existing Hadoop and Hive clusters.": {
+ "message": "Stores all data in object storage to reduce costs, while supporting HDFS for existing Hadoop and Hive clusters.",
+ "description": "Description for object storage and HDFS card"
+ },
+ "Parquet Data Format": {
+ "message": "Parquet Data Format",
+ "description": "Title for Parquet data format card"
+ },
+ "Uses the standard Parquet format, eliminating data lock-in risks.": {
+ "message": "Uses the standard Parquet format, eliminating data lock-in risks.",
+ "description": "Description for Parquet data format card"
+ },
+ "Decoupled Storage and Compute": {
+ "message": "Decoupled Storage and Compute",
+ "description": "Title for decoupled storage and compute card"
+ },
+ "Designed for multi-tenant data sharing with a truly decoupled architecture, enabling data marketplace functionality.": {
+ "message": "Designed for multi-tenant data sharing with a truly decoupled architecture, enabling data marketplace functionality.",
+ "description": "Description for decoupled storage and compute card"
+ },
+ "Open Source with Flexible Deployment": {
+ "message": "Open Source with Flexible Deployment",
+ "description": "Title for open source with flexible deployment card"
+ },
+ "Supports both public cloud SaaS and private deployments, with an open-source core to avoid vendor lock-in.": {
+ "message": "Supports both public cloud SaaS and private deployments, with an open-source core to avoid vendor lock-in.",
+ "description": "Description for open source with flexible deployment card"
+ },
+ "Data Lake Support": {
+ "message": "Data Lake Support",
+ "description": "Title for data lake support card"
+ },
+ "Reads data from Iceberg, Hive, and Delta Lake seamlessly.": {
+ "message": "Reads data from Iceberg, Hive, and Delta Lake seamlessly.",
+ "description": "Description for data lake support card"
}
}
diff --git a/i18n/zh/code.json b/i18n/zh/code.json
index fab79af41f..d992e8f41d 100644
--- a/i18n/zh/code.json
+++ b/i18n/zh/code.json
@@ -614,7 +614,7 @@
"description": "Databend Cloud 产品的标题"
},
"Fully-Managed on Cloud": {
- "message": "全托管云服务",
+ "message": "公有云服务 Databend Cloud & 按需按量付费",
"description": "Databend Cloud 产品的描述"
},
"Databend Enterprise": {
@@ -622,7 +622,7 @@
"description": "Databend Enterprise 产品的标题"
},
"Self-Hosted with Additional Enterprise Features": {
- "message": "自托管与额外的企业功能",
+ "message": "私有化部署 & 更多功能 & 收取 License 费用",
"description": "Databend Enterprise 产品的描述"
},
"Databend Community": {
@@ -630,7 +630,7 @@
"description": "Databend 社区版 产品的标题"
},
"Self-Hosted & Free": {
- "message": "自托管 & 免费",
+ "message": "私有化部署 & 基础功能 & 免费",
"description": "Databend 社区版 产品的描述"
},
"Getting Started": {
@@ -692,5 +692,57 @@
"FAQ": {
"message": "常见问题",
"description": "FAQ"
+ },
+ "Product Features": {
+ "message": "产品特点",
+ "description": "Product Features"
+ },
+ "Serverless Elastic Architecture": {
+ "message": "Serverless 弹性架构",
+ "description": "Title for serverless elastic architecture card"
+ },
+ "Stateless compute nodes with serverless elasticity enable rapid scaling and recovery based on workload.": {
+ "message": "计算层采用 Serverless 弹性架构,计算节点无状态,根据业务感知负载,具有快速的弹性扩展能力和业务恢复能力。",
+ "description": "Description for serverless elastic architecture card"
+ },
+ "Object Storage & HDFS": {
+ "message": "底层存储采用对象存储&HDFS",
+ "description": "Title for object storage and HDFS card"
+ },
+ "Stores all data in object storage to reduce costs, while supporting HDFS for existing Hadoop and Hive clusters.": {
+ "message": "所有数据存储在对象存储中,降低企业存储成本。对于原有 Hadoop、Hive 集群,支持读取 HDFS 中数据。",
+ "description": "Description for object storage and HDFS card"
+ },
+ "Parquet Data Format": {
+ "message": "开发数据格式 Parquet",
+ "description": "Title for Parquet data format card"
+ },
+ "Uses the standard Parquet format, eliminating data lock-in risks.": {
+ "message": "存储采用标准 Parquet 格式,无需担心数据锁定风险。",
+ "description": "Description for Parquet data format card"
+ },
+ "Decoupled Storage and Compute": {
+ "message": "存算分离架构,一份数据多个租户共享",
+ "description": "Title for decoupled storage and compute card"
+ },
+ "Designed for multi-tenant data sharing with a truly decoupled architecture, enabling data marketplace functionality.": {
+ "message": "Databend 自 Day 1 就是基于存算分离架构进行设计开发,真正的存算分离架构,一份数据可以共享给多个租户共享,实现数据集市的功能。",
+ "description": "Description for decoupled storage and compute card"
+ },
+ "Open Source with Flexible Deployment": {
+ "message": "开源,私有化部署和公有云服务均支持",
+ "description": "Title for open source with flexible deployment card"
+ },
+ "Supports both public cloud SaaS and private deployments, with an open-source core to avoid vendor lock-in.": {
+ "message": "Databend 支持公有云 SaaS 服务和私有化部署,内核开源,无需担心产品锁定,可以根据自身需求选择不同产品。",
+ "description": "Description for open source with flexible deployment card"
+ },
+ "Data Lake Support": {
+ "message": "支持数据湖",
+ "description": "Title for data lake support card"
+ },
+ "Reads data from Iceberg, Hive, and Delta Lake seamlessly.": {
+ "message": "支持读取 Iceberg、Hive、Delta Lake 中数据。",
+ "description": "Description for data lake support card"
}
}
diff --git a/src/components/DocsOverview/index.tsx b/src/components/DocsOverview/index.tsx
index 9aab391fd2..787ef3935d 100644
--- a/src/components/DocsOverview/index.tsx
+++ b/src/components/DocsOverview/index.tsx
@@ -527,7 +527,87 @@ const DocsOverview: FC = (): ReactElement => {
-
+
+
{$t("Product Features")}
+
+
+
+
+ {$t("Serverless Elastic Architecture")}
+
+
+ {$t(
+ "Stateless compute nodes with serverless elasticity enable rapid scaling and recovery based on workload."
+ )}
+
+
+
+
+
+
+ {$t("Object Storage & HDFS")}
+
+
+ {$t(
+ "Stores all data in object storage to reduce costs, while supporting HDFS for existing Hadoop and Hive clusters."
+ )}
+
+
+
+
+
+
+ {$t("Parquet Data Format")}
+
+
+ {$t(
+ "Uses the standard Parquet format, eliminating data lock-in risks."
+ )}
+
+
+
+
+
+
+ {$t("Decoupled Storage and Compute")}
+
+
+ {$t(
+ "Designed for multi-tenant data sharing with a truly decoupled architecture, enabling data marketplace functionality."
+ )}
+
+
+
+
+
+
+ {$t("Open Source with Flexible Deployment")}
+
+
+ {$t(
+ "Supports both public cloud SaaS and private deployments, with an open-source core to avoid vendor lock-in."
+ )}
+
+
+
+
+
+
+ {$t("Data Lake Support")}
+
+
+ {$t(
+ "Reads data from Iceberg, Hive, and Delta Lake seamlessly."
+ )}
+
+
+
+
+
+ {/*
*/}
);
};
diff --git a/src/components/DocsOverview/styles.module.scss b/src/components/DocsOverview/styles.module.scss
index b73652eaab..74c105dc98 100644
--- a/src/components/DocsOverview/styles.module.scss
+++ b/src/components/DocsOverview/styles.module.scss
@@ -131,3 +131,15 @@
padding-left: 20px;
padding-top: 20px;
}
+.productFeatures {
+ margin-bottom: 40px;
+ h3 {
+ font-weight: 600;
+ font-size: 18px;
+ margin-bottom: 20px;
+ }
+ .title {
+ border-top: 1px solid var(--color-border);
+ padding-top: 40px;
+ }
+}
From 90ee1f2a47120c86e3c0fb15cba613daffb50c03 Mon Sep 17 00:00:00 2001
From: Quan <787025321@qq.com>
Date: Wed, 22 Jan 2025 09:59:27 +0800
Subject: [PATCH 2/5] refator: adjust dir
---
docs/en/guides/00-overview/01-ecosystem.md | 43 -----------------
.../00-editions => 00-products}/00-dce.md | 4 +-
.../00-products/00-overview/01-ecosystem.md | 48 +++++++++++++++++++
.../{ => 00-products}/00-overview/02-faq.md | 2 +-
.../00-overview/_category_.json | 0
.../00-overview}/index.md | 1 +
.../01-dee/10-enterprise-features.md | 42 ++++++++--------
.../01-dee/20-license.md | 0
.../01-dee/index.md | 4 +-
.../02-dc/00-architecture.md | 0
.../02-dc/01-platforms.md | 0
.../02-dc/02-editions.md | 0
.../02-dc/03-pricing.md | 0
.../02-dc/_category_.json | 0
.../02-dc/index.md | 4 +-
.../{00-overview => 00-products}/index.md | 2 +-
docs/en/guides/10-deploy/index.md | 2 +-
17 files changed, 82 insertions(+), 70 deletions(-)
delete mode 100644 docs/en/guides/00-overview/01-ecosystem.md
rename docs/en/guides/{00-overview/00-editions => 00-products}/00-dce.md (95%)
create mode 100644 docs/en/guides/00-products/00-overview/01-ecosystem.md
rename docs/en/guides/{ => 00-products}/00-overview/02-faq.md (96%)
rename docs/en/guides/{ => 00-products}/00-overview/_category_.json (100%)
rename docs/en/guides/{00-overview/00-editions => 00-products/00-overview}/index.md (99%)
rename docs/en/guides/{00-overview/00-editions => 00-products}/01-dee/10-enterprise-features.md (86%)
rename docs/en/guides/{00-overview/00-editions => 00-products}/01-dee/20-license.md (100%)
rename docs/en/guides/{00-overview/00-editions => 00-products}/01-dee/index.md (89%)
rename docs/en/guides/{00-overview/00-editions => 00-products}/02-dc/00-architecture.md (100%)
rename docs/en/guides/{00-overview/00-editions => 00-products}/02-dc/01-platforms.md (100%)
rename docs/en/guides/{00-overview/00-editions => 00-products}/02-dc/02-editions.md (100%)
rename docs/en/guides/{00-overview/00-editions => 00-products}/02-dc/03-pricing.md (100%)
rename docs/en/guides/{00-overview/00-editions => 00-products}/02-dc/_category_.json (100%)
rename docs/en/guides/{00-overview/00-editions => 00-products}/02-dc/index.md (91%)
rename docs/en/guides/{00-overview => 00-products}/index.md (98%)
diff --git a/docs/en/guides/00-overview/01-ecosystem.md b/docs/en/guides/00-overview/01-ecosystem.md
deleted file mode 100644
index 892911e460..0000000000
--- a/docs/en/guides/00-overview/01-ecosystem.md
+++ /dev/null
@@ -1,43 +0,0 @@
----
-title: Ecosystem
----
-
-# Databend Ecosystem
-
-To seamlessly integrate with your workflow, Databend continually expands its ecosystem, actively integrating with key data tools and technologies in the industry. The image below provides an overview of the tools, platforms, and programming languages supported by Databend:
-
-![Alt text](@site/static/img/documents/overview/ecosystem.png)
-
-Refer to the links below for integration instructions and tutorials:
-
-- **Develop**
- - [Golang](/developer/drivers/golang)
- - [Python](/developer/drivers/python)
- - [Node.js](/developer/drivers/nodejs)
- - [Java](/developer/drivers/jdbc)
- - [Rust](/developer/drivers/rust)
-
-- **ETL**
- - [Airbyte](../40-load-data/02-load-db/airbyte.md)
- - [Kafka](../40-load-data/02-load-db/kafka.md)
- - [dbt](../40-load-data/02-load-db/dbt.md)
- - [Addax](../40-load-data/02-load-db/addax.md)
- - [Flink CDC](../40-load-data/02-load-db/flink-cdc.md)
- - [DataX](../40-load-data/02-load-db/datax.md)
- - [Debezium](../40-load-data/02-load-db/debezium.md)
-
-- **BI & Visualization**
- - [Metabase](../31-visualize/metabase.md)
- - [Grafana](../31-visualize/grafana.md)
- - [Redash](../31-visualize/redash.md)
- - [Tableau](../31-visualize/tableau.md)
-
-- **Notebooks**
- - [Deepnote](../31-visualize/deepnote.md)
- - [Jupyter Notebook](../31-visualize/jupyter.md)
-
-- **Log Collector**
- - [Vector](../40-load-data/02-load-db/vector.md)
-
-- **AI**
- - [MindsDB](../31-visualize/mindsdb.md)
\ No newline at end of file
diff --git a/docs/en/guides/00-overview/00-editions/00-dce.md b/docs/en/guides/00-products/00-dce.md
similarity index 95%
rename from docs/en/guides/00-overview/00-editions/00-dce.md
rename to docs/en/guides/00-products/00-dce.md
index a57bae25f1..5db6106d30 100644
--- a/docs/en/guides/00-overview/00-editions/00-dce.md
+++ b/docs/en/guides/00-products/00-dce.md
@@ -1,6 +1,8 @@
---
title: Databend Community
+sidebar_position: 4
---
+
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
@@ -27,7 +29,7 @@ Databend is an open-source, elastic, and workload-aware cloud data warehouse bui
-- Supports various object storage platforms. Click [here](../../10-deploy/01-deploy/00-understanding-deployment-modes.md#supported-object-storage) to see a full list of supported platforms.
+- Supports various object storage platforms. Click [here](../10-deploy/01-deploy/00-understanding-deployment-modes.md#supported-object-storage) to see a full list of supported platforms.
- Allows instant elasticity, enabling users to scale up or down based on their application needs.
diff --git a/docs/en/guides/00-products/00-overview/01-ecosystem.md b/docs/en/guides/00-products/00-overview/01-ecosystem.md
new file mode 100644
index 0000000000..c812b9358f
--- /dev/null
+++ b/docs/en/guides/00-products/00-overview/01-ecosystem.md
@@ -0,0 +1,48 @@
+---
+title: Ecosystem
+---
+
+# Databend Ecosystem
+
+To seamlessly integrate with your workflow, Databend continually expands its ecosystem, actively integrating with key data tools and technologies in the industry. The image below provides an overview of the tools, platforms, and programming languages supported by Databend:
+
+![Alt text](@site/static/img/documents/overview/ecosystem.png)
+
+Refer to the links below for integration instructions and tutorials:
+
+- **Develop**
+
+ - [Golang](/developer/drivers/golang)
+ - [Python](/developer/drivers/python)
+ - [Node.js](/developer/drivers/nodejs)
+ - [Java](/developer/drivers/jdbc)
+ - [Rust](/developer/drivers/rust)
+
+- **ETL**
+
+ - [Airbyte](../../40-load-data/02-load-db/airbyte.md)
+ - [Kafka](../../40-load-data/02-load-db/kafka.md)
+ - [dbt](../../40-load-data/02-load-db/dbt.md)
+ - [Addax](../../40-load-data/02-load-db/addax.md)
+ - [Flink CDC](../../40-load-data/02-load-db/flink-cdc.md)
+ - [DataX](../../40-load-data/02-load-db/datax.md)
+ - [Debezium](../../40-load-data/02-load-db/debezium.md)
+
+- **BI & Visualization**
+
+ - [Metabase](../../31-visualize/metabase.md)
+ - [Grafana](../../31-visualize/grafana.md)
+ - [Redash](../../31-visualize/redash.md)
+ - [Tableau](../../31-visualize/tableau.md)
+
+- **Notebooks**
+
+ - [Deepnote](../../31-visualize/deepnote.md)
+ - [Jupyter Notebook](../../31-visualize/jupyter.md)
+
+- **Log Collector**
+
+ - [Vector](../../40-load-data/02-load-db/vector.md)
+
+- **AI**
+ - [MindsDB](../../31-visualize/mindsdb.md)
diff --git a/docs/en/guides/00-overview/02-faq.md b/docs/en/guides/00-products/00-overview/02-faq.md
similarity index 96%
rename from docs/en/guides/00-overview/02-faq.md
rename to docs/en/guides/00-products/00-overview/02-faq.md
index 73f0186ba9..64a989a0d1 100644
--- a/docs/en/guides/00-overview/02-faq.md
+++ b/docs/en/guides/00-products/00-overview/02-faq.md
@@ -4,7 +4,7 @@ title: FAQ
### Q1: What are Databend's primary objects, hierarchy, and associated privileges?
-The diagram illustrates the hierarchical structure of Databend objects across two levels. Fine-grained privileges and ownership are designed for each type of object, providing flexibility. For more information, see [Access Control](../56-security/access-control/index.md).
+The diagram illustrates the hierarchical structure of Databend objects across two levels. Fine-grained privileges and ownership are designed for each type of object, providing flexibility. For more information, see [Access Control](../../56-security/access-control/index.md).
![Alt text](/img/guides/faq1.png)
diff --git a/docs/en/guides/00-overview/_category_.json b/docs/en/guides/00-products/00-overview/_category_.json
similarity index 100%
rename from docs/en/guides/00-overview/_category_.json
rename to docs/en/guides/00-products/00-overview/_category_.json
diff --git a/docs/en/guides/00-overview/00-editions/index.md b/docs/en/guides/00-products/00-overview/index.md
similarity index 99%
rename from docs/en/guides/00-overview/00-editions/index.md
rename to docs/en/guides/00-products/00-overview/index.md
index 76091beb97..225cb6e932 100644
--- a/docs/en/guides/00-overview/00-editions/index.md
+++ b/docs/en/guides/00-products/00-overview/index.md
@@ -1,5 +1,6 @@
---
title: Databend Products
+sidebar_position: 1
---
import IndexOverviewList from '@site/src/components/IndexOverviewList';
diff --git a/docs/en/guides/00-overview/00-editions/01-dee/10-enterprise-features.md b/docs/en/guides/00-products/01-dee/10-enterprise-features.md
similarity index 86%
rename from docs/en/guides/00-overview/00-editions/01-dee/10-enterprise-features.md
rename to docs/en/guides/00-products/01-dee/10-enterprise-features.md
index f2245ec7c9..5b36f25072 100644
--- a/docs/en/guides/00-overview/00-editions/01-dee/10-enterprise-features.md
+++ b/docs/en/guides/00-products/01-dee/10-enterprise-features.md
@@ -8,20 +8,20 @@ This page provides an updated list of available enterprise features. To access t
### Enterprise Feature List
-| Feature | Category | Description |
-| -------------------------------------------------------------------------------- | -------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| [Vacuum Temp Files](/sql/sql-commands/administration-cmds/vacuum-temp-files) | Storage | - Free up storage by removing temporary files, notably join, aggregate, and sort spill files.
- Set retention and file limits as needed. |
-| [Vacuum Dropped Table](/sql/sql-commands/ddl/table/vacuum-drop-table) | Storage | Optimizes storage by deleting data files of dropped tables. Offers a recovery option and a dry-run preview. |
-| [Vacuum Historical Data](/sql/sql-commands/ddl/table/vacuum-table) | Storage | Deep clean your storage space:
- Remove orphan segment and block files.
- Safely preview the removal of data files using the dry-run option. |
-| [Virtual Column](/sql/sql-commands/ddl/virtual-column) | Query | Enhance efficiency in querying Variant data:
- Virtual columns streamline queries, eliminating the need to traverse the entire nested structure. Direct data retrieval accelerates query execution.
- Virtual columns significantly cut memory usage in Variant data, reducing the risk of memory overflows. |
-| [Aggregating Index](/sql/sql-commands/ddl/aggregating-index) | Query | Elevate your query speed with aggregating indexes:
- Supercharge queries through precomputed and indexed aggregations.
- Customize the index to meet your unique data analysis requirements. |
-| [Computed Column](/sql/sql-commands/ddl/table/ddl-create-table#computed-columns) | Query | Computed columns save you time and effort by enabling derivation of new columns from existing ones:
- Automatic updates ensure accurate and consistent data.
- Advanced analysis and calculations can now be performed within the database.
- Two types of computed columns: stored and virtual. Virtual columns save you space as they are calculated on-the-fly when queried. |
-| [Python UDF](/guides/query/udf#python-requires-databend-enterprise) | Query | A Python UDF allows you to invoke Python code from a SQL query via Databend's built-in handler, enabling seamless integration of Python logic within your SQL queries. |
-| [ATTACH TABLE](/sql/sql-commands/ddl/table/attach-table) | Query | Attach Table enables you to seamlessly connect a table in the cloud service platform to an existing table deployed in a private deployment environment without the need to physically move the data. |
-| [Stream](/sql/sql-commands/ddl/stream) | Data Streaming | Efficient data change management with stream:
- Append-only mode supported: Instantly capture data insertions in real-time.
- Seamlessly leverage streams for direct querying and analysis, ensuring swift insights. |
-| [Masking Policy](/sql/sql-commands/ddl/mask-policy/) | Security | Enhance your data security with role-based masking feature:
- Safeguard sensitive information through customizable data masking.
- Preserve data usability while reinforcing security. |
-| Storage Encryption | Security | Enhance the security of your server-side data encryption, safeguarding your data from unauthorized access by the storage vendor:
- Choose encryption through service-managed keys, KMS managed keys, or customer-managed keys. Options may vary by storage type.
- Currently supported on Alibaba Cloud OSS.
See the [deploy guide](../../../10-deploy/01-deploy/01-non-production/01-deploying-databend.md) for encryption parameters for each storage vendor. |
-| [Fail-Safe](/guides/security/fail-safe) | Security | Recover table data from S3-compatible object storage. |
+| Feature | Category | Description |
+| -------------------------------------------------------------------------------- | -------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
+| [Vacuum Temp Files](/sql/sql-commands/administration-cmds/vacuum-temp-files) | Storage | - Free up storage by removing temporary files, notably join, aggregate, and sort spill files.
- Set retention and file limits as needed. |
+| [Vacuum Dropped Table](/sql/sql-commands/ddl/table/vacuum-drop-table) | Storage | Optimizes storage by deleting data files of dropped tables. Offers a recovery option and a dry-run preview. |
+| [Vacuum Historical Data](/sql/sql-commands/ddl/table/vacuum-table) | Storage | Deep clean your storage space:
- Remove orphan segment and block files.
- Safely preview the removal of data files using the dry-run option. |
+| [Virtual Column](/sql/sql-commands/ddl/virtual-column) | Query | Enhance efficiency in querying Variant data:
- Virtual columns streamline queries, eliminating the need to traverse the entire nested structure. Direct data retrieval accelerates query execution.
- Virtual columns significantly cut memory usage in Variant data, reducing the risk of memory overflows. |
+| [Aggregating Index](/sql/sql-commands/ddl/aggregating-index) | Query | Elevate your query speed with aggregating indexes:
- Supercharge queries through precomputed and indexed aggregations.
- Customize the index to meet your unique data analysis requirements. |
+| [Computed Column](/sql/sql-commands/ddl/table/ddl-create-table#computed-columns) | Query | Computed columns save you time and effort by enabling derivation of new columns from existing ones:
- Automatic updates ensure accurate and consistent data.
- Advanced analysis and calculations can now be performed within the database.
- Two types of computed columns: stored and virtual. Virtual columns save you space as they are calculated on-the-fly when queried. |
+| [Python UDF](/guides/query/udf#python-requires-databend-enterprise) | Query | A Python UDF allows you to invoke Python code from a SQL query via Databend's built-in handler, enabling seamless integration of Python logic within your SQL queries. |
+| [ATTACH TABLE](/sql/sql-commands/ddl/table/attach-table) | Query | Attach Table enables you to seamlessly connect a table in the cloud service platform to an existing table deployed in a private deployment environment without the need to physically move the data. |
+| [Stream](/sql/sql-commands/ddl/stream) | Data Streaming | Efficient data change management with stream:
- Append-only mode supported: Instantly capture data insertions in real-time.
- Seamlessly leverage streams for direct querying and analysis, ensuring swift insights. |
+| [Masking Policy](/sql/sql-commands/ddl/mask-policy/) | Security | Enhance your data security with role-based masking feature:
- Safeguard sensitive information through customizable data masking.
- Preserve data usability while reinforcing security. |
+| Storage Encryption | Security | Enhance the security of your server-side data encryption, safeguarding your data from unauthorized access by the storage vendor:
- Choose encryption through service-managed keys, KMS managed keys, or customer-managed keys. Options may vary by storage type.
- Currently supported on Alibaba Cloud OSS.
See the [deploy guide](../../10-deploy/01-deploy/01-non-production/01-deploying-databend.md) for encryption parameters for each storage vendor. |
+| [Fail-Safe](/guides/security/fail-safe) | Security | Recover table data from S3-compatible object storage. |
## Databend Community vs. Enterprise
@@ -59,13 +59,13 @@ tbody={[
### Extended Functionalities
### Deployment
diff --git a/docs/en/guides/00-overview/00-editions/01-dee/20-license.md b/docs/en/guides/00-products/01-dee/20-license.md
similarity index 100%
rename from docs/en/guides/00-overview/00-editions/01-dee/20-license.md
rename to docs/en/guides/00-products/01-dee/20-license.md
diff --git a/docs/en/guides/00-overview/00-editions/01-dee/index.md b/docs/en/guides/00-products/01-dee/index.md
similarity index 89%
rename from docs/en/guides/00-overview/00-editions/01-dee/index.md
rename to docs/en/guides/00-products/01-dee/index.md
index f48da37353..7e7061a6bb 100644
--- a/docs/en/guides/00-overview/00-editions/01-dee/index.md
+++ b/docs/en/guides/00-products/01-dee/index.md
@@ -1,6 +1,8 @@
---
title: Databend Enterprise
+sidebar_position: 3
---
+
import IndexOverviewList from '@site/src/components/IndexOverviewList';
Databend Enterprise enhances the [Databend Community Edition](../00-dce.md) by incorporating additional enterprise features, requiring a purchased license for utilization.
@@ -9,4 +11,4 @@ Learn more about Databend Enterprise Edition with the following topics:
-[Contact us](https://www.databend.com/contact-us/) now to get a trial license and be among the pioneers to experience the extraordinary features as they are unveiled.
\ No newline at end of file
+[Contact us](https://www.databend.com/contact-us/) now to get a trial license and be among the pioneers to experience the extraordinary features as they are unveiled.
diff --git a/docs/en/guides/00-overview/00-editions/02-dc/00-architecture.md b/docs/en/guides/00-products/02-dc/00-architecture.md
similarity index 100%
rename from docs/en/guides/00-overview/00-editions/02-dc/00-architecture.md
rename to docs/en/guides/00-products/02-dc/00-architecture.md
diff --git a/docs/en/guides/00-overview/00-editions/02-dc/01-platforms.md b/docs/en/guides/00-products/02-dc/01-platforms.md
similarity index 100%
rename from docs/en/guides/00-overview/00-editions/02-dc/01-platforms.md
rename to docs/en/guides/00-products/02-dc/01-platforms.md
diff --git a/docs/en/guides/00-overview/00-editions/02-dc/02-editions.md b/docs/en/guides/00-products/02-dc/02-editions.md
similarity index 100%
rename from docs/en/guides/00-overview/00-editions/02-dc/02-editions.md
rename to docs/en/guides/00-products/02-dc/02-editions.md
diff --git a/docs/en/guides/00-overview/00-editions/02-dc/03-pricing.md b/docs/en/guides/00-products/02-dc/03-pricing.md
similarity index 100%
rename from docs/en/guides/00-overview/00-editions/02-dc/03-pricing.md
rename to docs/en/guides/00-products/02-dc/03-pricing.md
diff --git a/docs/en/guides/00-overview/00-editions/02-dc/_category_.json b/docs/en/guides/00-products/02-dc/_category_.json
similarity index 100%
rename from docs/en/guides/00-overview/00-editions/02-dc/_category_.json
rename to docs/en/guides/00-products/02-dc/_category_.json
diff --git a/docs/en/guides/00-overview/00-editions/02-dc/index.md b/docs/en/guides/00-products/02-dc/index.md
similarity index 91%
rename from docs/en/guides/00-overview/00-editions/02-dc/index.md
rename to docs/en/guides/00-products/02-dc/index.md
index 7903f01b71..fb8e109c89 100644
--- a/docs/en/guides/00-overview/00-editions/02-dc/index.md
+++ b/docs/en/guides/00-products/02-dc/index.md
@@ -1,10 +1,12 @@
---
title: Databend Cloud
+sidebar_position: 2
---
+
import IndexOverviewList from '@site/src/components/IndexOverviewList';
Databend Cloud simplifies the use of Databend, eliminating the need for deployment, upgrades, or scaling. Currently available in specific AWS regions, it also includes all the [Enterprise Features](../01-dee/10-enterprise-features.md) provided in Databend Enterprise Edition.
Learn more about Databend Cloud with the following topics:
-
\ No newline at end of file
+
diff --git a/docs/en/guides/00-overview/index.md b/docs/en/guides/00-products/index.md
similarity index 98%
rename from docs/en/guides/00-overview/index.md
rename to docs/en/guides/00-products/index.md
index 2f1dcf7520..11bc976bf7 100644
--- a/docs/en/guides/00-overview/index.md
+++ b/docs/en/guides/00-products/index.md
@@ -1,5 +1,5 @@
---
-title: Overview
+title: Databend Products
slug: /
---
diff --git a/docs/en/guides/10-deploy/index.md b/docs/en/guides/10-deploy/index.md
index 2513887555..9926ec5a98 100644
--- a/docs/en/guides/10-deploy/index.md
+++ b/docs/en/guides/10-deploy/index.md
@@ -4,7 +4,7 @@ title: Self-Hosted Databend
import IndexOverviewList from '@site/src/components/IndexOverviewList';
-These guides provide detailed instructions for deploying and upgrading Databend, catering to both the [Databend Community Edition](../00-overview/00-editions/00-dce.md) and [Databend Enterprise Edition](../00-overview/00-editions/01-dee/index.md).
+These guides provide detailed instructions for deploying and upgrading Databend, catering to both the [Databend Community Edition](../00-products/00-dce.md) and [Databend Enterprise Edition](../00-products/01-dee/index.md).
:::tip try out databend cloud
Say goodbye to deployment and upgrade hassles – Databend Cloud manages these intricacies for you, freeing up your focus for what truly matters. Ready to experience the ease? [Sign up here](https://www.databend.com/apply/?r=doc-card).
From 6c62951bf6d39955165ff3530aba3910e9d562f9 Mon Sep 17 00:00:00 2001
From: soyeric128
Date: Tue, 21 Jan 2025 15:22:25 -0500
Subject: [PATCH 3/5] updates
---
docs/en/developer/00-drivers/01-python.md | 148 ++++++++-------
docs/en/tutorials/programming/_category_.json | 3 +
.../programming/python/_category_.json | 3 +
...th-databend-cloud-using-databend-driver.md | 59 ++++++
...atabend-cloud-using-databend-sqlalchemy.md | 38 ++++
.../integrating-with-self-hosted-databend.md | 174 ++++++++++++++++++
6 files changed, 359 insertions(+), 66 deletions(-)
create mode 100644 docs/en/tutorials/programming/_category_.json
create mode 100644 docs/en/tutorials/programming/python/_category_.json
create mode 100644 docs/en/tutorials/programming/python/integrating-with-databend-cloud-using-databend-driver.md
create mode 100644 docs/en/tutorials/programming/python/integrating-with-databend-cloud-using-databend-sqlalchemy.md
create mode 100644 docs/en/tutorials/programming/python/integrating-with-self-hosted-databend.md
diff --git a/docs/en/developer/00-drivers/01-python.md b/docs/en/developer/00-drivers/01-python.md
index 4f941cd81f..52cc3d8b81 100644
--- a/docs/en/developer/00-drivers/01-python.md
+++ b/docs/en/developer/00-drivers/01-python.md
@@ -4,14 +4,14 @@ title: Python
Databend offers the following Python packages enabling you to develop Python applications that interact with Databend:
-- [databend-py (**Recommended**)](https://github.com/databendcloud/databend-py): Provides a direct interface to the Databend database. It allows you to perform standard Databend operations such as user login, database and table creation, data insertion/loading, and querying.
+- [databend-driver (**Recommended**)](https://pypi.org/project/databend-driver/): A Python driver for Databend, providing both synchronous and asynchronous interfaces to interact with the Databend database, execute SQL queries, and handle data operations.
- [databend-sqlalchemy](https://github.com/databendcloud/databend-sqlalchemy): Provides a SQL toolkit and [Object-Relational Mapping](https://en.wikipedia.org/wiki/Object%E2%80%93relational_mapping) to interface with the Databend database. [SQLAlchemy](https://www.sqlalchemy.org/) is a popular SQL toolkit and ORM for Python, and databend-SQLAlchemy is a dialect for SQLAlchemy that allows you to use SQLAlchemy to interact with Databend.
-Both packages require Python version 3.5 or higher. To check your Python version, run `python --version` in your command prompt. To install the latest `databend-py` or `databend-sqlalchemy` package:
+Both packages require Python version 3.7 or higher. To check your Python version, run `python --version` in your command prompt. To install the latest `databend-driver` or `databend-sqlalchemy` package:
```bash
-# install databend-py
-pip install databend-py
+# install databend-driver
+pip install databend-driver
# install databend-sqlalchemy
pip install databend-sqlalchemy
@@ -47,9 +47,7 @@ This table illustrates the correspondence between Databend semi-structured data
| BITMAP | str |
| GEOMETRY | str |
-In the following tutorial, you'll learn how to utilize the packages above to develop your Python applications. The tutorial will walk you through creating a SQL user in Databend and then writing Python code to create a table, insert data, and perform data queries.
-
-## Tutorial-1: Integrating with Databend using Python
+## Tutorial-1: Integrating with Self-Hosted Databend
Before you start, make sure you have successfully installed a local Databend. For detailed instructions, see [Local and Docker Deployments](/guides/deploy/deploy/non-production/deploying-local).
@@ -64,31 +62,7 @@ CREATE USER user1 IDENTIFIED BY 'abc123';
GRANT ALL on *.* TO user1;
```
-### Step 2. Configuring Connection String (for databend-py)
-
-`databend-py` supports various parameters that can be configured either as URL parameters or as properties passed to the Client. The two examples provided below demonstrate equivalent ways of setting these parameters for the common DSN:
-
-Example 1: Using URL parameters
-
-```python
-# Format: ://:@/?
-client = Client.from_url('http://root@localhost:8000/db?secure=False©_purge=True&debug=True')
-```
-
-Example 2: Using Client parameters
-
-```python
-client = Client(
- host='tenant--warehouse.ch.datafusecloud.com',
- database="default",
- user="user",
- port="443",
- password="password", settings={"copy_purge": True, "force": True})
-```
-
-To create a valid DSN, select appropriate connection parameters outlined [here](https://github.com/databendcloud/databend-py/blob/main/docs/connection.md) based on your requirements.
-
-### Step 3. Write a Python Program
+### Step 2. Write a Python Program
In this step, you'll create a simple Python program that communicates with Databend. The program will involve tasks such as creating a table, inserting data, and executing data queries.
@@ -96,43 +70,55 @@ import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
-
-
-You will use the databend-py library to create a client instance and execute SQL queries directly.
+
-1. Install databend-py.
+1. Install databend-driver.
```shell
-pip install databend-py
+pip install databend-driver
```
2. Copy and paste the following code to the file `main.py`:
```python title='main.py'
-from databend_py import Client
+from databend_driver import BlockingDatabendClient
# Connecting to a local Databend with a SQL user named 'user1' and password 'abc123' as an example.
-# Feel free to use your own values while maintaining the same format.
-# Setting secure=False means the client will connect to Databend using HTTP instead of HTTPS.
-client = Client('user1:abc123@127.0.0.1', port=8000, secure=False)
-client.execute("CREATE DATABASE IF NOT EXISTS bookstore")
-client.execute("USE bookstore")
-client.execute("CREATE TABLE IF NOT EXISTS booklist(title VARCHAR, author VARCHAR, date VARCHAR)")
-client.execute("INSERT INTO booklist VALUES('Readings in Database Systems', 'Michael Stonebraker', '2004')")
+client = BlockingDatabendClient('databend://user1:abc123@127.0.0.1:8000/?sslmode=disable')
-_, results = client.execute("SELECT * FROM booklist")
-for (title, author, date) in results:
- print("{} {} {}".format(title, author, date))
-client.execute('drop table booklist')
-client.execute('drop database bookstore')
+# Create a cursor to interact with Databend
+cursor = client.cursor()
-# Close Connect.
-client.disconnect()
+# Create database and use it
+cursor.execute("CREATE DATABASE IF NOT EXISTS bookstore")
+cursor.execute("USE bookstore")
+
+# Create table
+cursor.execute("CREATE TABLE IF NOT EXISTS booklist(title VARCHAR, author VARCHAR, date VARCHAR)")
+
+# Insert data into the table
+cursor.execute("INSERT INTO booklist VALUES('Readings in Database Systems', 'Michael Stonebraker', '2004')")
+
+# Query data from the table
+cursor.execute("SELECT * FROM booklist")
+rows = cursor.fetchall()
+
+# Print the results
+for row in rows:
+ print(f"{row[0]} {row[1]} {row[2]}")
+
+# Drop the table and database
+cursor.execute('DROP TABLE booklist')
+cursor.execute('DROP DATABASE bookstore')
+
+# Close the cursor
+cursor.close()
```
3. Run `python main.py`:
-```text
+```bash
+python main.py
Readings in Database Systems Michael Stonebraker 2004
```
@@ -230,31 +216,61 @@ Readings in Database Systems Michael Stonebraker 2004
-## Tutorial-2: Integrating with Databend Cloud using Python (databend-py)
+## Tutorial-2: Integrating with Databend Cloud using databend-driver
Before you start, make sure you have successfully created a warehouse and obtained the connection information. For how to do that, see [Connecting to a Warehouse](/guides/cloud/using-databend-cloud/warehouses#connecting).
### Step 1. Install Dependencies with pip
```shell
-pip install databend-py
+pip install databend-driver
```
-### Step 2. Connect with databend-py
+### Step 2. Connect with databend-driver
+
+1. Copy and paste the following code to the file `main.py`:
```python
-from databend_py import Client
-
-client = Client.from_url(f"databend://{USER}:{PASSWORD}@${HOST}:443/{DATABASE}?&warehouse={WAREHOUSE_NAME}&secure=True)
-client.execute('DROP TABLE IF EXISTS data')
-client.execute('CREATE TABLE if not exists data (x Int32,y VARCHAR)')
-client.execute('DESC data')
-client.execute("INSERT INTO data (Col1,Col2) VALUES ", [1, 'yy', 2, 'xx'])
-_, res = client.execute('select * from data')
-print(res)
+from databend_driver import BlockingDatabendClient
+
+# Connecting to Databend Cloud with your credentials (replace PASSWORD, HOST, DATABASE, and WAREHOUSE_NAME)
+client = BlockingDatabendClient(f"databend://cloudapp:{PASSWORD}@{HOST}:443/{DATABASE}?warehouse={WAREHOUSE_NAME}")
+
+# Get a cursor from the client to execute queries
+cursor = client.cursor()
+
+# Drop the table if it exists
+cursor.execute('DROP TABLE IF EXISTS data')
+
+# Create the table if it doesn't exist
+cursor.execute('CREATE TABLE IF NOT EXISTS data (x Int32, y String)')
+
+# Describe the table
+cursor.execute('DESC data')
+
+# Insert data into the table
+cursor.execute("INSERT INTO data (x, y) VALUES (1, 'yy'), (2, 'xx')")
+
+# Select all data from the table
+cursor.execute('SELECT * FROM data')
+
+# Fetch all rows from the result
+rows = cursor.fetchall()
+
+# Print the result
+for row in rows:
+ print(row.values())
+```
+
+2. Run `python main.py`:
+
+```bash
+python main.py
+(1, 'yy')
+(2, 'xx')
```
-## Tutorial-3: Integrating with Databend Cloud using Python (databend-sqlalchemy)
+## Tutorial-3: Integrating with Databend Cloud using databend-sqlalchemy
Before you start, make sure you have successfully created a warehouse and obtained the connection information. For how to do that, see [Connecting to a Warehouse](/guides/cloud/using-databend-cloud/warehouses#connecting).
diff --git a/docs/en/tutorials/programming/_category_.json b/docs/en/tutorials/programming/_category_.json
new file mode 100644
index 0000000000..a2b8a275bb
--- /dev/null
+++ b/docs/en/tutorials/programming/_category_.json
@@ -0,0 +1,3 @@
+{
+ "label": "Programming"
+}
\ No newline at end of file
diff --git a/docs/en/tutorials/programming/python/_category_.json b/docs/en/tutorials/programming/python/_category_.json
new file mode 100644
index 0000000000..9d014e7c8d
--- /dev/null
+++ b/docs/en/tutorials/programming/python/_category_.json
@@ -0,0 +1,3 @@
+{
+ "label": "Python"
+}
\ No newline at end of file
diff --git a/docs/en/tutorials/programming/python/integrating-with-databend-cloud-using-databend-driver.md b/docs/en/tutorials/programming/python/integrating-with-databend-cloud-using-databend-driver.md
new file mode 100644
index 0000000000..cee7a4ad74
--- /dev/null
+++ b/docs/en/tutorials/programming/python/integrating-with-databend-cloud-using-databend-driver.md
@@ -0,0 +1,59 @@
+---
+title: Integrating with Databend Cloud using databend-driver
+---
+
+In this tutorial, we'll walk you through how to use the `databend-driver` to connect to Databend Cloud, create a table, insert data, and retrieve results with Python.
+
+## Before You Start
+
+Before you start, make sure you have successfully created a warehouse and obtained the connection information. For how to do that, see [Connecting to a Warehouse](/guides/cloud/using-databend-cloud/warehouses#connecting).
+
+## Step 1: Install Dependencies with pip
+
+```shell
+pip install databend-driver
+```
+
+## Step 2: Connect with databend-driver
+
+1. Copy and paste the following code to the file `main.py`:
+
+```python
+from databend_driver import BlockingDatabendClient
+
+# Connecting to Databend Cloud with your credentials (replace PASSWORD, HOST, DATABASE, and WAREHOUSE_NAME)
+client = BlockingDatabendClient(f"databend://cloudapp:{PASSWORD}@{HOST}:443/{DATABASE}?warehouse={WAREHOUSE_NAME}")
+
+# Get a cursor from the client to execute queries
+cursor = client.cursor()
+
+# Drop the table if it exists
+cursor.execute('DROP TABLE IF EXISTS data')
+
+# Create the table if it doesn't exist
+cursor.execute('CREATE TABLE IF NOT EXISTS data (x Int32, y String)')
+
+# Describe the table
+cursor.execute('DESC data')
+
+# Insert data into the table
+cursor.execute("INSERT INTO data (x, y) VALUES (1, 'yy'), (2, 'xx')")
+
+# Select all data from the table
+cursor.execute('SELECT * FROM data')
+
+# Fetch all rows from the result
+rows = cursor.fetchall()
+
+# Print the result
+for row in rows:
+ print(row.values())
+```
+
+2. Run `python main.py`:
+
+```bash
+python main.py
+(1, 'yy')
+(2, 'xx')
+```
\ No newline at end of file
diff --git a/docs/en/tutorials/programming/python/integrating-with-databend-cloud-using-databend-sqlalchemy.md b/docs/en/tutorials/programming/python/integrating-with-databend-cloud-using-databend-sqlalchemy.md
new file mode 100644
index 0000000000..b70db822cd
--- /dev/null
+++ b/docs/en/tutorials/programming/python/integrating-with-databend-cloud-using-databend-sqlalchemy.md
@@ -0,0 +1,38 @@
+---
+title: Integrating with Databend Cloud using databend-sqlalchemy
+---
+
+In this tutorial, we'll walk you through how to use the `databend-sqlalchemy` library to connect to Databend Cloud, create a table, insert data, and query results using Python.
+
+## Before You Start
+
+Before you start, make sure you have successfully created a warehouse and obtained the connection information. For how to do that, see [Connecting to a Warehouse](/guides/cloud/using-databend-cloud/warehouses#connecting).
+
+## Step 1: Install Dependencies with pip
+
+```shell
+pip install databend-sqlalchemy
+```
+
+## Step 2: Connect with databend_sqlalchemy
+
+1. Copy and paste the following code to the file `main.py`:
+
+```python
+from databend_sqlalchemy import connector
+
+# Connecting to Databend Cloud with your credentials (replace PASSWORD, HOST, DATABASE, and WAREHOUSE_NAME)
+cursor = connector.connect(f"databend://cloudapp:{PASSWORD}@{HOST}:443/{DATABASE}?warehouse={WAREHOUSE_NAME}").cursor()
+cursor.execute('DROP TABLE IF EXISTS data')
+cursor.execute('CREATE TABLE IF NOT EXISTS data( Col1 TINYINT, Col2 VARCHAR )')
+cursor.execute("INSERT INTO data (Col1, Col2) VALUES (%s, %s), (%s, %s)", [1, 'yy', 2, 'xx'])
+cursor.execute("SELECT * FROM data")
+print(cursor.fetchall())
+```
+
+2. Run `python main.py`:
+
+```bash
+python main.py
+[(1, 'yy'), (2, 'xx')]
+```
\ No newline at end of file
diff --git a/docs/en/tutorials/programming/python/integrating-with-self-hosted-databend.md b/docs/en/tutorials/programming/python/integrating-with-self-hosted-databend.md
new file mode 100644
index 0000000000..0cdfc85f28
--- /dev/null
+++ b/docs/en/tutorials/programming/python/integrating-with-self-hosted-databend.md
@@ -0,0 +1,174 @@
+---
+title: Integrating with Self-Hosted Databend
+---
+
+This tutorial demonstrates how to connect to a locally deployed Databend instance using Python. We'll cover three approaches—`databend-driver`, `databend-sqlalchemy` with the connector, and `databend-sqlalchemy` with the engine—to perform basic operations such as creating a database, adding a table, inserting data, querying, and cleaning up resources.
+
+## Before You Start
+
+Before you start, make sure you have successfully installed a local Databend. For detailed instructions, see [Local and Docker Deployments](/guides/deploy/deploy/non-production/deploying-local).
+
+## Step 1: Prepare a SQL User Account
+
+To connect your program to Databend and execute SQL operations, you must provide a SQL user account with appropriate privileges in your code. Create one in Databend if needed, and ensure that the SQL user has only the necessary privileges for security.
+
+This tutorial uses a SQL user named 'user1' with password 'abc123' as an example. As the program will write data into Databend, the user needs ALL privileges. For how to manage SQL users and their privileges, see [User & Role](/sql/sql-commands/ddl/user/).
+
+```sql
+CREATE USER user1 IDENTIFIED BY 'abc123';
+GRANT ALL on *.* TO user1;
+```
+
+## Step 2: Write a Python Program
+
+In this step, you'll create a simple Python program that communicates with Databend. The program will involve tasks such as creating a table, inserting data, and executing data queries.
+
+import Tabs from '@theme/Tabs';
+import TabItem from '@theme/TabItem';
+
+
+
+
+1. Install databend-driver.
+
+```shell
+pip install databend-driver
+```
+
+2. Copy and paste the following code to the file `main.py`:
+
+```python title='main.py'
+from databend_driver import BlockingDatabendClient
+
+# Connecting to a local Databend with a SQL user named 'user1' and password 'abc123' as an example.
+client = BlockingDatabendClient('databend://user1:abc123@127.0.0.1:8000/?sslmode=disable')
+
+# Create a cursor to interact with Databend
+cursor = client.cursor()
+
+# Create database and use it
+cursor.execute("CREATE DATABASE IF NOT EXISTS bookstore")
+cursor.execute("USE bookstore")
+
+# Create table
+cursor.execute("CREATE TABLE IF NOT EXISTS booklist(title VARCHAR, author VARCHAR, date VARCHAR)")
+
+# Insert data into the table
+cursor.execute("INSERT INTO booklist VALUES('Readings in Database Systems', 'Michael Stonebraker', '2004')")
+
+# Query data from the table
+cursor.execute("SELECT * FROM booklist")
+rows = cursor.fetchall()
+
+# Print the results
+for row in rows:
+ print(f"{row[0]} {row[1]} {row[2]}")
+
+# Drop the table and database
+cursor.execute('DROP TABLE booklist')
+cursor.execute('DROP DATABASE bookstore')
+
+# Close the cursor
+cursor.close()
+```
+
+3. Run `python main.py`:
+
+```bash
+python main.py
+Readings in Database Systems Michael Stonebraker 2004
+```
+
+
+
+
+
+You will use the databend-sqlalchemy library to create a connector instance and execute SQL queries using the cursor object.
+
+1. Install databend-sqlalchemy.
+
+```shell
+pip install databend-sqlalchemy
+```
+
+2. Copy and paste the following code to the file `main.py`:
+
+```python title='main.py'
+from databend_sqlalchemy import connector
+
+# Connecting to a local Databend with a SQL user named 'user1' and password 'abc123' as an example.
+# Feel free to use your own values while maintaining the same format.
+conn = connector.connect(f"http://user1:abc123@127.0.0.1:8000").cursor()
+conn.execute("CREATE DATABASE IF NOT EXISTS bookstore")
+conn.execute("USE bookstore")
+conn.execute("CREATE TABLE IF NOT EXISTS booklist(title VARCHAR, author VARCHAR, date VARCHAR)")
+conn.execute("INSERT INTO booklist VALUES('Readings in Database Systems', 'Michael Stonebraker', '2004')")
+conn.execute('SELECT * FROM booklist')
+
+results = conn.fetchall()
+for (title, author, date) in results:
+ print("{} {} {}".format(title, author, date))
+conn.execute('drop table booklist')
+conn.execute('drop database bookstore')
+
+# Close Connect.
+conn.close()
+```
+
+3. Run `python main.py`:
+
+```text
+Readings in Database Systems Michael Stonebraker 2004
+```
+
+
+
+
+
+You will use the databend-sqlalchemy library to create an engine instance and execute SQL queries using the connect method to create connections that can execute queries.
+
+1. Install databend-sqlalchemy.
+
+```shell
+pip install databend-sqlalchemy
+```
+
+2. Copy and paste the following code to the file `main.py`:
+
+```python title='main.py'
+from sqlalchemy import create_engine, text
+
+# Connecting to a local Databend with a SQL user named 'user1' and password 'abc123' as an example.
+# Feel free to use your own values while maintaining the same format.
+# Setting secure=False means the client will connect to Databend using HTTP instead of HTTPS.
+engine = create_engine("databend://user1:abc123@127.0.0.1:8000/default?secure=False")
+
+connection1 = engine.connect()
+connection2 = engine.connect()
+
+with connection1.begin() as trans:
+ connection1.execute(text("CREATE DATABASE IF NOT EXISTS bookstore"))
+ connection1.execute(text("USE bookstore"))
+ connection1.execute(text("CREATE TABLE IF NOT EXISTS booklist(title VARCHAR, author VARCHAR, date VARCHAR)"))
+ connection1.execute(text("INSERT INTO booklist VALUES('Readings in Database Systems', 'Michael Stonebraker', '2004')"))
+
+result = connection2.execute(text("SELECT * FROM booklist"))
+results = result.fetchall()
+
+for (title, author, date) in results:
+ print("{} {} {}".format(title, author, date))
+
+# Close Connect.
+connection1.close()
+connection2.close()
+engine.dispose()
+```
+
+3. Run `python main.py`:
+
+```text
+Readings in Database Systems Michael Stonebraker 2004
+```
+
+
+
\ No newline at end of file
From 8634c1fc756c359cadce625e2e9639e280376c72 Mon Sep 17 00:00:00 2001
From: soyeric128
Date: Tue, 21 Jan 2025 20:52:20 -0500
Subject: [PATCH 4/5] Update 01-python.md
---
docs/en/developer/00-drivers/01-python.md | 254 +---------------------
1 file changed, 5 insertions(+), 249 deletions(-)
diff --git a/docs/en/developer/00-drivers/01-python.md b/docs/en/developer/00-drivers/01-python.md
index 52cc3d8b81..eddd720262 100644
--- a/docs/en/developer/00-drivers/01-python.md
+++ b/docs/en/developer/00-drivers/01-python.md
@@ -4,7 +4,7 @@ title: Python
Databend offers the following Python packages enabling you to develop Python applications that interact with Databend:
-- [databend-driver (**Recommended**)](https://pypi.org/project/databend-driver/): A Python driver for Databend, providing both synchronous and asynchronous interfaces to interact with the Databend database, execute SQL queries, and handle data operations.
+- [databend-driver (**Recommended**)](https://pypi.org/project/databend-driver/): A Python driver for Databend, providing both synchronous and asynchronous interfaces to interact with Databend, execute SQL queries, and handle data operations.
- [databend-sqlalchemy](https://github.com/databendcloud/databend-sqlalchemy): Provides a SQL toolkit and [Object-Relational Mapping](https://en.wikipedia.org/wiki/Object%E2%80%93relational_mapping) to interface with the Databend database. [SQLAlchemy](https://www.sqlalchemy.org/) is a popular SQL toolkit and ORM for Python, and databend-SQLAlchemy is a dialect for SQLAlchemy that allows you to use SQLAlchemy to interact with Databend.
Both packages require Python version 3.7 or higher. To check your Python version, run `python --version` in your command prompt. To install the latest `databend-driver` or `databend-sqlalchemy` package:
@@ -47,252 +47,8 @@ This table illustrates the correspondence between Databend semi-structured data
| BITMAP | str |
| GEOMETRY | str |
-## Tutorial-1: Integrating with Self-Hosted Databend
+## Tutorials
-Before you start, make sure you have successfully installed a local Databend. For detailed instructions, see [Local and Docker Deployments](/guides/deploy/deploy/non-production/deploying-local).
-
-### Step 1. Prepare a SQL User Account
-
-To connect your program to Databend and execute SQL operations, you must provide a SQL user account with appropriate privileges in your code. Create one in Databend if needed, and ensure that the SQL user has only the necessary privileges for security.
-
-This tutorial uses a SQL user named 'user1' with password 'abc123' as an example. As the program will write data into Databend, the user needs ALL privileges. For how to manage SQL users and their privileges, see [User & Role](/sql/sql-commands/ddl/user/).
-
-```sql
-CREATE USER user1 IDENTIFIED BY 'abc123';
-GRANT ALL on *.* TO user1;
-```
-
-### Step 2. Write a Python Program
-
-In this step, you'll create a simple Python program that communicates with Databend. The program will involve tasks such as creating a table, inserting data, and executing data queries.
-
-import Tabs from '@theme/Tabs';
-import TabItem from '@theme/TabItem';
-
-
-
-
-1. Install databend-driver.
-
-```shell
-pip install databend-driver
-```
-
-2. Copy and paste the following code to the file `main.py`:
-
-```python title='main.py'
-from databend_driver import BlockingDatabendClient
-
-# Connecting to a local Databend with a SQL user named 'user1' and password 'abc123' as an example.
-client = BlockingDatabendClient('databend://user1:abc123@127.0.0.1:8000/?sslmode=disable')
-
-# Create a cursor to interact with Databend
-cursor = client.cursor()
-
-# Create database and use it
-cursor.execute("CREATE DATABASE IF NOT EXISTS bookstore")
-cursor.execute("USE bookstore")
-
-# Create table
-cursor.execute("CREATE TABLE IF NOT EXISTS booklist(title VARCHAR, author VARCHAR, date VARCHAR)")
-
-# Insert data into the table
-cursor.execute("INSERT INTO booklist VALUES('Readings in Database Systems', 'Michael Stonebraker', '2004')")
-
-# Query data from the table
-cursor.execute("SELECT * FROM booklist")
-rows = cursor.fetchall()
-
-# Print the results
-for row in rows:
- print(f"{row[0]} {row[1]} {row[2]}")
-
-# Drop the table and database
-cursor.execute('DROP TABLE booklist')
-cursor.execute('DROP DATABASE bookstore')
-
-# Close the cursor
-cursor.close()
-```
-
-3. Run `python main.py`:
-
-```bash
-python main.py
-Readings in Database Systems Michael Stonebraker 2004
-```
-
-
-
-
-
-You will use the databend-sqlalchemy library to create a connector instance and execute SQL queries using the cursor object.
-
-1. Install databend-sqlalchemy.
-
-```shell
-pip install databend-sqlalchemy
-```
-
-2. Copy and paste the following code to the file `main.py`:
-
-```python title='main.py'
-from databend_sqlalchemy import connector
-
-# Connecting to a local Databend with a SQL user named 'user1' and password 'abc123' as an example.
-# Feel free to use your own values while maintaining the same format.
-conn = connector.connect(f"http://user1:abc123@127.0.0.1:8000").cursor()
-conn.execute("CREATE DATABASE IF NOT EXISTS bookstore")
-conn.execute("USE bookstore")
-conn.execute("CREATE TABLE IF NOT EXISTS booklist(title VARCHAR, author VARCHAR, date VARCHAR)")
-conn.execute("INSERT INTO booklist VALUES('Readings in Database Systems', 'Michael Stonebraker', '2004')")
-conn.execute('SELECT * FROM booklist')
-
-results = conn.fetchall()
-for (title, author, date) in results:
- print("{} {} {}".format(title, author, date))
-conn.execute('drop table booklist')
-conn.execute('drop database bookstore')
-
-# Close Connect.
-conn.close()
-```
-
-3. Run `python main.py`:
-
-```text
-Readings in Database Systems Michael Stonebraker 2004
-```
-
-
-
-
-
-You will use the databend-sqlalchemy library to create an engine instance and execute SQL queries using the connect method to create connections that can execute queries.
-
-1. Install databend-sqlalchemy.
-
-```shell
-pip install databend-sqlalchemy
-```
-
-2. Copy and paste the following code to the file `main.py`:
-
-```python title='main.py'
-from sqlalchemy import create_engine, text
-
-# Connecting to a local Databend with a SQL user named 'user1' and password 'abc123' as an example.
-# Feel free to use your own values while maintaining the same format.
-# Setting secure=False means the client will connect to Databend using HTTP instead of HTTPS.
-engine = create_engine("databend://user1:abc123@127.0.0.1:8000/default?secure=False")
-
-connection1 = engine.connect()
-connection2 = engine.connect()
-
-with connection1.begin() as trans:
- connection1.execute(text("CREATE DATABASE IF NOT EXISTS bookstore"))
- connection1.execute(text("USE bookstore"))
- connection1.execute(text("CREATE TABLE IF NOT EXISTS booklist(title VARCHAR, author VARCHAR, date VARCHAR)"))
- connection1.execute(text("INSERT INTO booklist VALUES('Readings in Database Systems', 'Michael Stonebraker', '2004')"))
-
-result = connection2.execute(text("SELECT * FROM booklist"))
-results = result.fetchall()
-
-for (title, author, date) in results:
- print("{} {} {}".format(title, author, date))
-
-# Close Connect.
-connection1.close()
-connection2.close()
-engine.dispose()
-```
-
-3. Run `python main.py`:
-
-```text
-Readings in Database Systems Michael Stonebraker 2004
-```
-
-
-
-
-## Tutorial-2: Integrating with Databend Cloud using databend-driver
-
-Before you start, make sure you have successfully created a warehouse and obtained the connection information. For how to do that, see [Connecting to a Warehouse](/guides/cloud/using-databend-cloud/warehouses#connecting).
-
-### Step 1. Install Dependencies with pip
-
-```shell
-pip install databend-driver
-```
-
-### Step 2. Connect with databend-driver
-
-1. Copy and paste the following code to the file `main.py`:
-
-```python
-from databend_driver import BlockingDatabendClient
-
-# Connecting to Databend Cloud with your credentials (replace PASSWORD, HOST, DATABASE, and WAREHOUSE_NAME)
-client = BlockingDatabendClient(f"databend://cloudapp:{PASSWORD}@{HOST}:443/{DATABASE}?warehouse={WAREHOUSE_NAME}")
-
-# Get a cursor from the client to execute queries
-cursor = client.cursor()
-
-# Drop the table if it exists
-cursor.execute('DROP TABLE IF EXISTS data')
-
-# Create the table if it doesn't exist
-cursor.execute('CREATE TABLE IF NOT EXISTS data (x Int32, y String)')
-
-# Describe the table
-cursor.execute('DESC data')
-
-# Insert data into the table
-cursor.execute("INSERT INTO data (x, y) VALUES (1, 'yy'), (2, 'xx')")
-
-# Select all data from the table
-cursor.execute('SELECT * FROM data')
-
-# Fetch all rows from the result
-rows = cursor.fetchall()
-
-# Print the result
-for row in rows:
- print(row.values())
-```
-
-2. Run `python main.py`:
-
-```bash
-python main.py
-(1, 'yy')
-(2, 'xx')
-```
-
-## Tutorial-3: Integrating with Databend Cloud using databend-sqlalchemy
-
-Before you start, make sure you have successfully created a warehouse and obtained the connection information. For how to do that, see [Connecting to a Warehouse](/guides/cloud/using-databend-cloud/warehouses#connecting).
-
-### Step 1. Install Dependencies with pip
-
-```shell
-pip install databend-sqlalchemy
-```
-
-### Step 2. Connect with Databend SQLAlchemy
-
-```python
-from databend_sqlalchemy import connector
-
-cursor = connector.connect(f"databend://{USER}:{PASSWORD}@${HOST}:443/{DATABASE}?&warehouse={WAREHOUSE_NAME}).cursor()
-cursor.execute('DROP TABLE IF EXISTS data')
-cursor.execute('CREATE TABLE IF NOT EXISTS data( Col1 TINYINT, Col2 VARCHAR )')
-cursor.execute("INSERT INTO data (Col1,Col2) VALUES ", [1, 'yy', 2, 'xx'])
-cursor.execute("SELECT * FROM data")
-print(cursor.fetchall())
-```
-
-:::tip
-Replace `{USER}, {PASSWORD}, {HOST}, {WAREHOUSE_NAME} and {DATABASE}` in the code with your connection information. For how to obtain the connection information, see [Connecting to a Warehouse](/guides/cloud/using-databend-cloud/warehouses#connecting).
-:::
+- [Integrating with Databend Cloud using databend-driver](/tutorials/programming/python/integrating-with-databend-cloud-using-databend-driver)
+- [Integrating with Databend Cloud using databend-sqlalchemy](/tutorials/programming/python/integrating-with-databend-cloud-using-databend-sqlalchemy)
+- [Integrating with Self-Hosted Databend](/tutorials/programming/python/integrating-with-self-hosted-databend)
\ No newline at end of file
From 75fda9c76965561ba86400219aa3b3f1c80cc0a3 Mon Sep 17 00:00:00 2001
From: soyeric128
Date: Tue, 21 Jan 2025 21:18:33 -0500
Subject: [PATCH 5/5] Update
integrating-with-databend-cloud-using-databend-driver.md
---
.../integrating-with-databend-cloud-using-databend-driver.md | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/docs/en/tutorials/programming/python/integrating-with-databend-cloud-using-databend-driver.md b/docs/en/tutorials/programming/python/integrating-with-databend-cloud-using-databend-driver.md
index cee7a4ad74..bb5a4425bb 100644
--- a/docs/en/tutorials/programming/python/integrating-with-databend-cloud-using-databend-driver.md
+++ b/docs/en/tutorials/programming/python/integrating-with-databend-cloud-using-databend-driver.md
@@ -31,10 +31,7 @@ cursor = client.cursor()
cursor.execute('DROP TABLE IF EXISTS data')
# Create the table if it doesn't exist
-cursor.execute('CREATE TABLE IF NOT EXISTS data (x Int32, y String)')
-
-# Describe the table
-cursor.execute('DESC data')
+cursor.execute('CREATE TABLE IF NOT EXISTS data (x Int32, y String)')
# Insert data into the table
cursor.execute("INSERT INTO data (x, y) VALUES (1, 'yy'), (2, 'xx')")