Skip to content

Commit ee2cab2

Browse files
committed
replace EN source with draft AI translation from https://github.com/pingcap/docs/tree/i18n-zh-release-8.5
1 parent e97b28c commit ee2cab2

23 files changed

+1235
-1159
lines changed

ai/explore-data-with-chat2query.md

Lines changed: 98 additions & 98 deletions
Large diffs are not rendered by default.

ai/sql-proxy-account.md

Lines changed: 40 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,90 +1,90 @@
11
---
22
title: SQL Proxy Account
3-
summary: Learn about the SQL proxy account in TiDB Cloud.
3+
summary: 了解 TiDB Cloud 中的 SQL 代理账号。
44
---
55

6-
# SQL Proxy Account
6+
# SQL 代理账号 <!-- translated by AI -->
77

8-
A SQL proxy account is a SQL user account that is automatically created by TiDB Cloud to access the database via [SQL Editor](/ai/explore-data-with-chat2query.md) or [Data Service](https://docs.pingcap.com/tidbcloud/api/v1beta1/dataservice) on behalf of a TiDB Cloud user. For example, `testuser@pingcap.com` is a TiDB Cloud user account, while `3jhEcSimm7keKP8.testuser._41mqK6H4` is its corresponding SQL proxy account.
8+
SQL 代理账号是 TiDB Cloud 自动为 TiDB Cloud 用户创建的 SQL 用户账号,用于通过 [SQL Editor](/ai/explore-data-with-chat2query.md) [Data Service](https://docs.pingcap.com/tidbcloud/api/v1beta1/dataservice) 代表用户访问数据库。例如,`testuser@pingcap.com` 是一个 TiDB Cloud 用户账号,而 `3jhEcSimm7keKP8.testuser._41mqK6H4` 则是其对应的 SQL 代理账号。
99

10-
SQL proxy accounts provide a secure, token-based authentication mechanism for accessing the database in TiDB Cloud. By eliminating the need for traditional username and password credentials, SQL proxy accounts enhance security and simplify access management.
10+
SQL 代理账号为在 TiDB Cloud 中访问数据库提供了一种安全的、基于令牌的身份验证机制。通过消除传统的用户名和密码凭证,SQL 代理账号提升了安全性并简化了访问管理。
1111

12-
The key benefits of SQL proxy accounts are as follows:
12+
SQL 代理账号的主要优势如下:
1313

14-
- Enhanced security: mitigates risks associated with static credentials by using JWT tokens.
15-
- Streamlined access: restricts access specifically to the SQL Editor and Data Service, ensuring precise control.
16-
- Ease of management: simplifies authentication for developers and administrators working with TiDB Cloud.
14+
- 增强安全性:通过使用 JWT 令牌,降低了与静态凭证相关的风险。
15+
- 精简访问控制:仅限于 SQL Editor Data Service 访问,确保精确的权限管理。
16+
- 易于管理:为开发者和管理员简化了 TiDB Cloud 的身份验证流程。
1717

18-
## Identify the SQL proxy account
18+
## 识别 SQL 代理账号
1919

20-
If you want to identify whether a specific SQL account is a SQL proxy account, take the following steps:
20+
如果你想判断某个 SQL 账号是否为 SQL 代理账号,请按照以下步骤操作:
2121

22-
1. Examine the `mysql.user` table:
22+
1. 检查 `mysql.user` 表:
2323

2424
```sql
2525
USE mysql;
2626
SELECT user FROM user WHERE plugin = 'tidb_auth_token';
2727
```
2828

29-
2. Check grants for the SQL account. If roles like `role_admin`, `role_readonly`, or `role_readwrite` are listed, then it is a SQL proxy account.
29+
2. 检查该 SQL 账号的授权信息。如果授权中包含 `role_admin``role_readonly` `role_readwrite` 等角色,则该账号为 SQL 代理账号。
3030

3131
```sql
3232
SHOW GRANTS for 'username';
3333
```
3434

35-
## How the SQL proxy account is created
35+
## SQL 代理账号的创建方式
3636

37-
The SQL proxy account is automatically created during TiDB Cloud cluster initialization for the TiDB Cloud user who is granted a role with permissions in the cluster.
37+
TiDB Cloud 用户被授予集群权限角色时,SQL 代理账号会在 TiDB Cloud 集群初始化期间自动创建。
3838

39-
## How the SQL proxy account is deleted
39+
## SQL 代理账号的删除方式
4040

41-
When a user is removed from [an organization](/tidb-cloud/manage-user-access.md#remove-an-organization-member) or [a project](/tidb-cloud/manage-user-access.md#remove-a-project-member), or their role changes to one that does not have access to the cluster, the SQL proxy account is automatically deleted.
41+
当用户被移出 [组织](/tidb-cloud/manage-user-access.md#remove-an-organization-member) 或 [项目](/tidb-cloud/manage-user-access.md#remove-a-project-member),或者其角色变更为无权访问集群的角色时,SQL 代理账号会被自动删除。
4242

43-
Note that if a SQL proxy account is manually deleted, it will be automatically recreated when the user log in to the TiDB Cloud console next time.
43+
需要注意的是,如果 SQL 代理账号被手动删除,当用户下次登录 TiDB Cloud 控制台时,该账号会被自动重新创建。
4444

45-
## SQL proxy account username
45+
## SQL 代理账号用户名
4646

47-
In some cases, the SQL proxy account username is exactly the same as the TiDB Cloud username, but in other cases it is not exactly the same. The SQL proxy account username is determined by the length of the TiDB Cloud user's email address. The rules are as follows:
47+
在某些情况下,SQL 代理账号的用户名与 TiDB Cloud 用户名完全相同,但在其他情况下则不完全相同。SQL 代理账号的用户名由 TiDB Cloud 用户邮箱地址的长度决定,规则如下:
4848

49-
| Environment | Email length | Username format |
49+
| 环境 | 邮箱长度 | 用户名格式 |
5050
| ----------- | ------------ | --------------- |
51-
| TiDB Cloud Dedicated | <= 32 characters | Full email address |
52-
| TiDB Cloud Dedicated | > 32 characters | `prefix($email, 23)_prefix(base58(sha1($email)), 8)` |
53-
| {{{ .starter }}} | <= 15 characters | `serverless_unique_prefix + "." + email` |
54-
| {{{ .starter }}} | > 15 characters | `serverless_unique_prefix + "." + prefix($email, 6)_prefix(base58(sha1($email)), 8)` |
51+
| TiDB Cloud Dedicated | <= 32 个字符 | 完整邮箱地址 |
52+
| TiDB Cloud Dedicated | > 32 个字符 | `prefix($email, 23)_prefix(base58(sha1($email)), 8)` |
53+
| TiDB Cloud Serverless | <= 15 个字符 | `serverless_unique_prefix + "." + email` |
54+
| TiDB Cloud Serverless | > 15 个字符 | `serverless_unique_prefix + "." + prefix($email, 6)_prefix(base58(sha1($email)), 8)` |
5555

56-
Examples:
56+
示例:
5757

58-
| Environment | Email address | SQL proxy account username |
58+
| 环境 | 邮箱地址 | SQL 代理账号用户名 |
5959
| ----------- | ----- | -------- |
6060
| TiDB Cloud Dedicated | `user@pingcap.com` | `user@pingcap.com` |
6161
| TiDB Cloud Dedicated | `longemailaddressexample@pingcap.com` | `longemailaddressexample_48k1jwL9` |
62-
| {{{ .starter }}} | `u1@pingcap.com` | `{user_name_prefix}.u1@pingcap.com` |
63-
| {{{ .starter }}} | `longemailaddressexample@pingcap.com` | `{user_name_prefix}.longem_48k1jwL9`|
62+
| TiDB Cloud Serverless | `u1@pingcap.com` | `{user_name_prefix}.u1@pingcap.com` |
63+
| TiDB Cloud Serverless | `longemailaddressexample@pingcap.com` | `{user_name_prefix}.longem_48k1jwL9`|
6464

6565
> **Note:**
6666
>
67-
> In the preceding table, `{user_name_prefix}` is a unique prefix generated by TiDB Cloud to distinguish {{{ .starter }}} clusters. For details, see the [user name prefix](/tidb-cloud/select-cluster-tier.md#user-name-prefix) of {{{ .starter }}} clusters.
67+
> 在上表中,`{user_name_prefix}` 是 TiDB Cloud 为区分 TiDB Cloud Serverless 集群而生成的唯一前缀。详情请参见 TiDB Cloud Serverless 集群的 [user name prefix](/tidb-cloud/select-cluster-tier.md#user-name-prefix)
6868

69-
## SQL proxy account password
69+
## SQL 代理账号密码
7070

71-
Since SQL proxy accounts are JWT token-based, it is not necessary to manage passwords for these accounts. The security token is automatically managed by the system.
71+
由于 SQL 代理账号基于 JWT 令牌,因此无需为这些账号管理密码。安全令牌由系统自动管理。
7272

73-
## SQL proxy account roles
73+
## SQL 代理账号角色
7474

75-
The SQL proxy account's role depends on the TiDB Cloud user's IAM role:
75+
SQL 代理账号的角色取决于 TiDB Cloud 用户的 IAM 角色:
7676

77-
- Organization level:
77+
- 组织级别:
7878
- Organization Owner: role_admin
79-
- Organization Billing Manager: No proxy account
80-
- Organization Viewer: No proxy account
81-
- Organization Console Audit Manager: No proxy account
79+
- Organization Billing Manager: 无代理账号
80+
- Organization Viewer: 无代理账号
81+
- Organization Console Audit Manager: 无代理账号
8282

83-
- Project level:
83+
- 项目级别:
8484
- Project Owner: role_admin
8585
- Project Data Access Read-Write: role_readwrite
8686
- Project Data Access Read-Only: role_readonly
8787

88-
## SQL proxy account access control
88+
## SQL 代理账号访问控制
8989

90-
SQL proxy accounts are JWT token-based and only accessible to the Data Service and SQL Editor. It is impossible to access the TiDB Cloud cluster using a SQL proxy account with a username and password.
90+
SQL 代理账号基于 JWT 令牌,仅可用于 Data Service SQL Editor 访问。无法通过用户名和密码使用 SQL 代理账号访问 TiDB Cloud 集群。

ai/vector-search-auto-embedding-amazon-titan.md

Lines changed: 34 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,38 @@
11
---
22
title: Amazon Titan Embeddings
3-
summary: Learn how to use Amazon Titan embedding models in TiDB Cloud.
3+
summary: 了解如何在 TiDB Cloud 中使用 Amazon Titan 嵌入模型。
44
---
55

6-
# Amazon Titan Embeddings
6+
# Amazon Titan Embeddings <!-- translated by AI -->
77

8-
This document describes how to use Amazon Titan embedding models with [Auto Embedding](/ai/vector-search-auto-embedding-overview.md) in TiDB Cloud to perform semantic searches from text queries.
8+
本文档介绍如何在 TiDB Cloud 中结合 [Auto Embedding](/ai/vector-search-auto-embedding-overview.md) 使用 Amazon Titan 嵌入模型,从文本查询中执行语义搜索。
99

1010
> **Note:**
1111
>
12-
> [Auto Embedding](/ai/vector-search-auto-embedding-overview.md) is only available on {{{ .starter }}} clusters hosted on AWS.
12+
> [Auto Embedding](/ai/vector-search-auto-embedding-overview.md) 仅适用于托管在 AWS 上的 TiDB Cloud Starter 集群。
1313
14-
## Available models
14+
## 可用模型
1515

16-
TiDB Cloud provides the following [Amazon Titan embedding model](https://docs.aws.amazon.com/bedrock/latest/userguide/titan-embedding-models.html) natively. No API key is required.
16+
TiDB Cloud 原生提供以下 [Amazon Titan 嵌入模型](https://docs.aws.amazon.com/bedrock/latest/userguide/titan-embedding-models.html)。无需 API 密钥。
1717

18-
**Amazon Titan Text Embedding V2 model**
18+
**Amazon Titan Text Embedding V2 模型**
1919

20-
- Name: `tidbcloud_free/amazon/titan-embed-text-v2`
21-
- Dimensions: 1024 (default), 512, 256
22-
- Distance metric: Cosine, L2
23-
- Languages: English (100+ languages in preview)
24-
- Typical use cases: RAG, document search, reranking, and classification
25-
- Maximum input text tokens: 8,192
26-
- Maximum input text characters: 50,000
27-
- Price: Free
28-
- Hosted by TiDB Cloud:
29-
- Bring Your Own Key:
20+
- 名称:`tidbcloud_free/amazon/titan-embed-text-v2`
21+
- 维度:1024(默认)、512256
22+
- 距离度量:CosineL2
23+
- 支持语言:英语(预览支持 100+ 种语言)
24+
- 典型用例:RAG、文档检索、重排序、分类
25+
- 最大输入文本 token 数:8,192
26+
- 最大输入文本字符数:50,000
27+
- 价格:免费
28+
- TiDB Cloud 托管:
29+
- 支持自带密钥:
3030

31-
For more information about this model, see [Amazon Bedrock documentation](https://docs.aws.amazon.com/bedrock/latest/userguide/titan-embedding-models.html).
31+
关于该模型的更多信息,请参见 [Amazon Bedrock 文档](https://docs.aws.amazon.com/bedrock/latest/userguide/titan-embedding-models.html)
3232

33-
## SQL usage example
33+
## SQL 使用示例
3434

35-
The following example shows how to use the Amazon Titan embedding model with Auto Embedding.
35+
以下示例展示了如何结合 Auto Embedding 使用 Amazon Titan 嵌入模型。
3636

3737
```sql
3838
CREATE TABLE sample (
@@ -64,7 +64,7 @@ ORDER BY
6464
LIMIT 2;
6565
```
6666

67-
Result:
67+
结果:
6868

6969
```
7070
+------+----------------------------------------------------------------+
@@ -75,14 +75,14 @@ Result:
7575
+------+----------------------------------------------------------------+
7676
```
7777

78-
## Options
78+
## 可选参数
7979

80-
You can specify the following options via the `additional_json_options` parameter of the `EMBED_TEXT()` function:
80+
你可以通过 `EMBED_TEXT()` 函数的 `additional_json_options` 参数指定以下选项:
8181

82-
- `normalize` (optional): whether to normalize the output embedding. Defaults to `true`.
83-
- `dimensions` (optional): the number of dimensions of the output embedding. Supported values: `1024` (default), `512`, and `256`.
82+
- `normalize`(可选):是否对输出嵌入向量进行归一化。默认为 `true`
83+
- `dimensions`(可选):输出嵌入向量的维度。支持的取值:`1024`(默认)、`512``256`
8484

85-
**Example: Use an alternative dimension**
85+
**示例:使用其他维度**
8686

8787
```sql
8888
CREATE TABLE sample (
@@ -115,7 +115,7 @@ ORDER BY
115115
LIMIT 2;
116116
```
117117

118-
Result:
118+
结果:
119119

120120
```
121121
+------+----------------------------------------------------------------+
@@ -126,13 +126,13 @@ Result:
126126
+------+----------------------------------------------------------------+
127127
```
128128

129-
## Python usage example
129+
## Python 使用示例
130130

131-
See [PyTiDB Documentation](https://pingcap.github.io/ai/guides/auto-embedding/).
131+
参见 [PyTiDB 文档](https://pingcap.github.io/ai/guides/auto-embedding/)
132132

133-
## See also
133+
## 参见
134134

135-
- [Auto Embedding Overview](/ai/vector-search-auto-embedding-overview.md)
136-
- [Vector Search](/ai/vector-search-overview.md)
137-
- [Vector Functions and Operators](/ai/vector-search-functions-and-operators.md)
138-
- [Hybrid Search](/ai/vector-search-hybrid-search.md)
135+
- [Auto Embedding 概览](/ai/vector-search-auto-embedding-overview.md)
136+
- [向量检索](/vector-search/vector-search-overview.md)
137+
- [向量函数与操作符](/vector-search/vector-search-functions-and-operators.md)
138+
- [混合检索](/ai/vector-search-hybrid-search.md)

0 commit comments

Comments
 (0)