Skip to content

Commit 9ba8fab

Browse files
authored
warehouse: add more for connect (#2272)
* warehouse: add more for connect * improve cloud index.md * add image lang path, make ai auto check when transalting * make the lang replace more powerful: image/text/link
1 parent 0ccbc25 commit 9ba8fab

File tree

8 files changed

+149
-5
lines changed

8 files changed

+149
-5
lines changed

.github/workflows/prompt.txt

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,51 @@ Your task is to translate Databend documentation from English to Chinese while m
2121
- For content outside of code blocks, perform a complete and accurate translation into Chinese.
2222
- Follow all language conventions as outlined in the guidelines.
2323

24+
4. **Process Language-Specific Content:**
25+
- When you encounter comments in the following format:
26+
```
27+
{/* LANG_REPLACE:
28+
type=image|url|text
29+
en=English_content
30+
cn=Chinese_content
31+
*/}
32+
```
33+
- Replace the content immediately following this comment with the appropriate language version based on the type:
34+
- For `type=image`: Replace the entire image path in the subsequent image tag
35+
- For `type=url`: Replace the URL in the subsequent link
36+
- For `type=text`: Replace the text as specified
37+
- When translating to Chinese, use the content specified after "cn="
38+
- When translating to English, use the content specified after "en="
39+
- Do not include the original comment in the output
40+
- Examples:
41+
```
42+
{/* LANG_REPLACE:
43+
type=image
44+
en=../static/img/en/diagram.png
45+
cn=../static/img/cn/diagram.png
46+
*/}
47+
![alt text](../static/img/en/diagram.png)
48+
```
49+
50+
```
51+
{/* LANG_REPLACE:
52+
type=url
53+
en=databend.com
54+
cn=databend.cn
55+
*/}
56+
[Databend Website](https://databend.com)
57+
```
58+
59+
```
60+
{/* LANG_REPLACE:
61+
type=text
62+
en=Enterprise Edition
63+
cn=企业版
64+
*/}
65+
Enterprise Edition
66+
```
67+
68+
2469
## Strict Formatting Rules:
2570
- NEVER modify Markdown markup structure, links, or URLs
2671
- Keep all non-comment content in code blocks unchanged

docs/en/guides/20-cloud/10-using-databend-cloud/01-warehouses.md

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,8 +140,72 @@ For example, for an XSmall Warehouse priced at $1 per hour, if one cluster is ac
140140

141141
Connecting to a warehouse provides the compute resources required to run queries and analyze data within Databend Cloud. This connection is necessary when accessing Databend Cloud from your applications or SQL clients.
142142

143+
### Connection Methods
144+
145+
Databend Cloud supports multiple connection methods to meet your specific needs. For detailed connection instructions, see the [SQL Clients documentation](/guides/sql-clients/).
146+
147+
#### SQL Clients & Tools
148+
149+
| Client | Type | Best For | Key Features |
150+
|--------|------|----------|------------|
151+
| **[BendSQL](/guides/sql-clients/bendsql)** | Command Line | Developers, Scripts | Native CLI, Rich formatting, Multiple install options |
152+
| **[DBeaver](/guides/sql-clients/jdbc)** | GUI Application | Data Analysis, Visual Queries | Built-in driver, Cross-platform, Query builder |
153+
154+
#### Developer Drivers
155+
156+
| Language | Driver | Use Case | Documentation |
157+
|----------|--------|----------|---------------|
158+
| **Go** | Golang Driver | Backend Applications | [Golang Guide](/guides/sql-clients/developers/golang) |
159+
| **Python** | Python Connector | Data Science, Analytics | [Python Guide](/guides/sql-clients/developers/python) |
160+
| **Node.js** | JavaScript Driver | Web Applications | [Node.js Guide](/guides/sql-clients/developers/nodejs) |
161+
| **Java** | JDBC Driver | Enterprise Applications | [JDBC Guide](/guides/sql-clients/developers/jdbc) |
162+
| **Rust** | Rust Driver | System Programming | [Rust Guide](/guides/sql-clients/developers/rust) |
163+
164+
### Obtaining Connection Information
165+
143166
To obtain the connection information for a warehouse:
144167

145168
1. Click **Connect** on the **Overview** page.
146169
2. Select the database and warehouse you wish to connect to. The connection information will update based on your selection.
147170
3. The connection details include a SQL user named `cloudapp` with a randomly generated password. Databend Cloud does not store this password. Be sure to copy and save it securely. If you forget the password, click **Reset** to generate a new one.
171+
172+
{/* LANG_REPLACE:
173+
type=image
174+
en=../../../../../static/img/documents/warehouses/databend_cloud_dsn.gif
175+
cn=../../../../../static/img/documents_cn/warehouses/databend_cloud_dsn.gif
176+
*/}
177+
![alt text](../../../../../static/img/documents/warehouses/databend_cloud_dsn.gif)
178+
179+
### Connection String Format
180+
181+
Databend Cloud automatically generates your connection string when you click **Connect**:
182+
183+
```
184+
databend://<username>:<password>@<tenant>.gw.<region>.default.databend.com:443/<database>?warehouse=<warehouse_name>
185+
```
186+
187+
Where:
188+
- `<username>`: Default is `cloudapp`
189+
- `<password>`: Click **Reset** to view or change
190+
- `<tenant>`, `<region>`: Your account information (shown in the connection details)
191+
- `<database>`: Selected database (shown in the connection details)
192+
- `<warehouse_name>`: Selected warehouse (shown in the connection details)
193+
194+
### Creating SQL Users for Warehouse Access
195+
196+
Besides the default `cloudapp` user, you can create additional SQL users for better security and access control:
197+
198+
```sql
199+
-- Create a new SQL user
200+
CREATE USER warehouse_user1 IDENTIFIED BY 'StrongPassword123';
201+
202+
-- Grant ALL on database
203+
-- This user can access all tables in the database
204+
GRANT ALL ON my_database.* TO warehouse_user1;
205+
```
206+
207+
For more details, see [CREATE USER](/sql/sql-commands/ddl/user/user-create-user) and [GRANT](/sql/sql-commands/ddl/user/grant) documentation.
208+
209+
### Connection Security
210+
211+
All connections to Databend Cloud warehouses use TLS encryption by default. For enterprise users requiring additional security, [AWS PrivateLink](/guides/sql-clients/privatelink) is available to establish private connections between your VPC and Databend Cloud.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
"label": "Working with Databend Cloud"
2+
"label": "Databend Cloud"
33
}

docs/en/guides/20-cloud/index.md

Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,35 @@
22
title: Working with Databend Cloud
33
---
44

5-
import IndexOverviewList from '@site/src/components/IndexOverviewList';
5+
# Databend Cloud Overview
6+
7+
Databend Cloud is a fully-managed cloud data warehouse service that provides a seamless, scalable, and cost-effective solution for your data analytics needs. This guide will help you navigate through the essential aspects of using Databend Cloud.
8+
9+
## Quick Navigation
10+
11+
| Category | Resource | Description |
12+
|----------|----------|-------------|
13+
| **Getting Started** | [Creating a New Account](/guides/cloud/new-account) | Sign up for Databend Cloud and create your organization |
14+
| **Fundamentals** | [Organization & Members](/guides/cloud/using-databend-cloud/organization) | Understand how organizations work and manage team members |
15+
| | [Warehouses](/guides/cloud/using-databend-cloud/warehouses) | Learn about compute resources, sizes, and best practices |
16+
| | [Worksheets](/guides/cloud/using-databend-cloud/worksheet) | Execute SQL queries and analyze data |
17+
| | [Dashboard](/guides/cloud/using-databend-cloud/dashboard) | Monitor your data analytics with visualizations |
18+
| **Management** | [Managing Costs](/guides/cloud/manage/costs) | Set spending limits and control your expenses |
19+
| | [Monitoring](/guides/cloud/manage/monitor) | Track usage and performance |
20+
| | [AI Features](/guides/cloud/manage/ai-features) | Leverage AI capabilities for data analysis |
21+
| | [Metrics](/guides/cloud/manage/metrics) | Analyze performance metrics |
22+
23+
## 🔗 Connection Options
24+
25+
| Client Type | Options | Use Cases |
26+
|-------------|---------|----------|
27+
| **SQL Clients** | [BendSQL](/guides/sql-clients/bendsql) | Command line interface for developers and scripts |
28+
| | [DBeaver](/guides/sql-clients/jdbc) | GUI application for data analysis and visual queries |
29+
| **Programming** | [Python](/guides/sql-clients/developers/python) | Data science, analytics, and machine learning |
30+
| | [Go](/guides/sql-clients/developers/golang) | Backend applications and microservices |
31+
| | [Node.js](/guides/sql-clients/developers/nodejs) | Web applications and services |
32+
| | [Java](/guides/sql-clients/developers/jdbc) | Enterprise applications |
33+
34+
For detailed connection instructions and more options, see the [SQL Clients](/guides/sql-clients/) section.
635

7-
<IndexOverviewList />
836

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
"label": "Connect"
2+
"label": "Connect to Databend"
33
}

docs/en/guides/30-sql-clients/index.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,14 @@
22
title: Connect to Databend
33
---
44

5-
Databend supports multiple connection methods to suit different use cases. Choose the method that best fits your needs:
5+
Databend supports multiple connection methods to suit different use cases. All SQL clients and drivers below work with both Databend Cloud and self-hosted Databend deployments - <span class="text-blue">the only difference is how you obtain your connection string</span>.
6+
7+
## Obtaining Connection Strings
8+
9+
| Deployment | How to Get Connection String | Connection Format |
10+
|------------|------------------------------|-------------------|
11+
| **Databend Cloud** | 1. Log in to [Databend Cloud](https://app.databend.com)<br/>2. Click **Connect** on the Overview page<br/>3. Select your database and warehouse<br/>4. Copy the generated connection details | `databend://<username>:<password>@<tenant>.gw.<region>.default.databend.com:443/<database>?warehouse=<warehouse_name>` |
12+
| **Self-Hosted** | Use your deployment information:<br/>• Default user: `root` (or custom SQL user)<br/>• Host: your server address (e.g., `localhost`) | `databend://<username>:<password>@<hostname>:<port>/<database>` |
613

714
## SQL Clients & Tools
815

8.49 MB
Loading
10.5 MB
Loading

0 commit comments

Comments
 (0)