diff --git a/.github/workflows/addDocsToS3BucketAWS.yml b/.github/workflows/addDocsToS3BucketAWS.yml index a1da1ae72c..23380e9705 100644 --- a/.github/workflows/addDocsToS3BucketAWS.yml +++ b/.github/workflows/addDocsToS3BucketAWS.yml @@ -16,6 +16,7 @@ on: - "scripts/sync-skill.mjs" - "sidebars.ts" - "docusaurus.config.ts" + - ".npmrc" - "package.json" - "pnpm-lock.yaml" - "versions.json" @@ -44,9 +45,6 @@ jobs: node-version: ${{ matrix.node-version }} cache: 'pnpm' - run: pnpm install - - run: pnpm sync-skill - env: - DOC_LANG: zh - run: pnpm build env: BIEL_PROJECT_ID: ${{ secrets.BIEL_PROJECT_ID }} diff --git a/.github/workflows/node-build.yml b/.github/workflows/node-build.yml index e9f61daaa3..a829787fc8 100644 --- a/.github/workflows/node-build.yml +++ b/.github/workflows/node-build.yml @@ -30,3 +30,27 @@ jobs: - run: pnpm install - run: pnpm test - run: pnpm run build + + check-links: + name: Check ${{ matrix.doc-lang }} links + runs-on: ubuntu-latest + + strategy: + matrix: + doc-lang: [en, zh] + + steps: + - uses: actions/checkout@v4 + - name: Install pnpm + uses: pnpm/action-setup@v4 + with: + version: 8.6.0 + - name: Use Node.js 22 + uses: actions/setup-node@v4 + with: + node-version: 22.x + cache: 'pnpm' + - run: pnpm install + - run: pnpm check:links + env: + DOC_LANG: ${{ matrix.doc-lang }} diff --git a/.npmrc b/.npmrc new file mode 100644 index 0000000000..6c59086d86 --- /dev/null +++ b/.npmrc @@ -0,0 +1 @@ +enable-pre-post-scripts=true diff --git a/docs/getting-started/quick-start.md b/docs/getting-started/quick-start.md index 90c3b55fc6..cd94e9dacc 100644 --- a/docs/getting-started/quick-start.md +++ b/docs/getting-started/quick-start.md @@ -83,7 +83,7 @@ CREATE TABLE app_logs ( ) WITH ('append_mode'='true'); ``` -- `log_msg` enables [full-text index](/user-guide/manage-data/data-index.md#fulltext-index) for keyword search. +- `log_msg` enables [full-text index](/user-guide/manage-data/data-index.md#full-text-index) for keyword search. - [`append_mode`](/user-guide/deployments-administration/performance-tuning/design-table.md#when-to-use-append-only-tables) optimizes for log workloads (no deduplication overhead). ### Traces table diff --git a/docs/reference/http-endpoints.md b/docs/reference/http-endpoints.md index 23e612112b..7b99df2c1d 100644 --- a/docs/reference/http-endpoints.md +++ b/docs/reference/http-endpoints.md @@ -18,7 +18,7 @@ Endpoints that is not versioned (under `/v1`). For admin usage like health check - **Description**: Provides a health check endpoint to verify that the server is running. - **Usage**: Access this endpoint to check the health status of the server. -Please refer to the [check GreptimeDB health documentation](/enterprise/deployments-administration/monitoring/check-db-status.md#check-if-greptimedb-is-running-normally) for an example. +Please refer to the [check GreptimeDB health documentation](/user-guide/deployments-administration/monitoring/check-db-status.md#check-if-greptimedb-is-running-normally) for an example. ### Status @@ -27,7 +27,7 @@ Please refer to the [check GreptimeDB health documentation](/enterprise/deployme - **Description**: Retrieves the current status of the server. - **Usage**: Use this endpoint to obtain server status information. -Please refer to the [Check GreptimeDB status documentation](/enterprise/deployments-administration/monitoring/check-db-status.md#check-greptimedb-status) for an example. +Please refer to the [Check GreptimeDB status documentation](/user-guide/deployments-administration/monitoring/check-db-status.md#check-greptimedb-runtime-status) for an example. ### Metrics diff --git a/docs/reference/pipeline/write-log-api.md b/docs/reference/pipeline/write-log-api.md index 73338ecaf7..4b71cec57f 100644 --- a/docs/reference/pipeline/write-log-api.md +++ b/docs/reference/pipeline/write-log-api.md @@ -5,7 +5,7 @@ description: Describes how to write logs to GreptimeDB using a pipeline via the # APIs for Writing Logs -Before writing logs, please read the [Pipeline Configuration](/user-guide/logs/use-custom-pipelines.md#upload-pipeline) to complete the configuration setup and upload. +Before writing logs, please read the [Pipeline Configuration](/user-guide/logs/use-custom-pipelines.md#upload-the-pipeline) to complete the configuration setup and upload. ## HTTP API @@ -157,4 +157,4 @@ The table is also set with a ttl of 1 day. ## Examples -Please refer to the "Writing Logs" section in the [Quick Start](/user-guide/logs/quick-start.md#direct-http-ingestion) and [Using Custom Pipelines](/user-guide/logs/use-custom-pipelines.md#write-logs) guide for examples. +Please refer to the "Writing Logs" section in the [Quick Start](/user-guide/logs/quick-start.md#direct-http-ingestion) and [Using Custom Pipelines](/user-guide/logs/use-custom-pipelines.md#ingest-logs-using-the-pipeline) guide for examples. diff --git a/docs/reference/sql/alter.md b/docs/reference/sql/alter.md index ede5ddc260..083d606735 100644 --- a/docs/reference/sql/alter.md +++ b/docs/reference/sql/alter.md @@ -335,7 +335,7 @@ You can specify the following options using `FULLTEXT INDEX WITH` when enabling - `granularity`: (For `bloom` backend) The size of data chunks covered by each filter. A smaller granularity improves filtering but increases index size. Default is `10240`. - `false_positive_rate`: (For `bloom` backend) The probability of misidentifying a block. A lower rate improves accuracy (better filtering) but increases index size. Value is a float between `0` and `1`. Default is `0.01`. -For more information on full-text index configuration and performance comparison, refer to the [Full-Text Index Configuration Guide](/user-guide/manage-data/data-index.md#fulltext-index). +For more information on full-text index configuration and performance comparison, refer to the [Full-Text Index Configuration Guide](/user-guide/manage-data/data-index.md#full-text-index). If `WITH ` is not specified, `FULLTEXT INDEX` will use the default values. diff --git a/docs/reference/sql/case.md b/docs/reference/sql/case.md index 0a2abe80d0..806826cb50 100644 --- a/docs/reference/sql/case.md +++ b/docs/reference/sql/case.md @@ -33,7 +33,7 @@ The `CASE` statement can be used in various clauses, such as `SELECT`, `WHERE`, ### Use `CASE` in `SELECT` In the `SELECT` clause, you can use the `CASE` statement to create new columns based on conditions. -please see [the example](/user-guide/query-data/sql.md#case) in the query data guide. +please see [the example](/user-guide/query-data/sql.md#case-expression) in the query data guide. You can also use `CASE` with functions like `SUM` to conditionally aggregate data. for example, you can calculate the total number of logs with status 200 and 404: diff --git a/docs/reference/sql/compatibility.md b/docs/reference/sql/compatibility.md index 9e7d19dfcf..20088002fc 100644 --- a/docs/reference/sql/compatibility.md +++ b/docs/reference/sql/compatibility.md @@ -14,11 +14,11 @@ GreptimeDB supports a subset of ANSI SQL and has some unique extensions. Some ma 2. Insert data: Consistent with ANSI SQL syntax, but requires the `TIME INDEX` column value (or default value) to be provided. 3. Update data: Does not support `UPDATE` syntax, but if the primary key and `TIME INDEX` corresponding column values are the same during `INSERT`, subsequent inserted rows will overwrite previously written rows, effectively achieving an update. * Since 0.8, GreptimeDB supports [append mode](/reference/sql/create.md#create-an-append-only-table) that creates an append-only table with `append_mode="true"` option which keeps duplicate rows. - * GreptimeDB supports [merge mode](/reference/sql/create.md#create-an-append-only-table) that creates a table with `merge_mode="last_non_null"` option which allow updating a field partially. + * GreptimeDB supports [merge mode](/reference/sql/create.md#create-a-table-with-merge-mode) that creates a table with `merge_mode="last_non_null"` option which allow updating a field partially. 4. Query data: Query syntax is compatible with ANSI SQL, with some functional differences and omissions. * Since v0.9.0, begins to support [VIEW](/user-guide/query-data/view.md). * TQL syntax extension: Supports executing PromQL in SQL via TQL subcommands. Please refer to the [TQL](./tql.md) section for details. - * [Range Query](/reference/sql/range.md#range-query) to query and aggregate data within a range of time. + * [Range Query](/reference/sql/range.md) to query and aggregate data within a range of time. 5. Delete data: Deletion syntax is basically consistent with ANSI SQL. 6. Others: * Identifiers such as table names and column names have constraints similar to ANSI SQL, are case sensitive, and require double quotes when encountering special characters or uppercase letters. diff --git a/docs/reference/sql/create.md b/docs/reference/sql/create.md index 109bcca49a..df0cab7b6f 100644 --- a/docs/reference/sql/create.md +++ b/docs/reference/sql/create.md @@ -538,7 +538,7 @@ CREATE [OR REPLACE] VIEW [ IF NOT EXISTS ] AS select_statement ``` -For the statement to create or update a view, please read the [view user guide](/user-guide/query-data/view.md#view). +For the statement to create or update a view, please read the [view user guide](/user-guide/query-data/view.md). ## CREATE TRIGGER diff --git a/docs/reference/sql/data-types.md b/docs/reference/sql/data-types.md index 7b59a9052b..d77d03cb15 100644 --- a/docs/reference/sql/data-types.md +++ b/docs/reference/sql/data-types.md @@ -266,7 +266,7 @@ Output: ### Query JSON data -You can query the JSON data directly or extract specific fields using [JSON functions](./functions/overview.md#json-functions) provided by GreptimeDB. Here's an example: +You can query the JSON data directly or extract specific fields using [JSON functions](./functions/json.md) provided by GreptimeDB. Here's an example: ```sql SELECT json_get_string(my_json, '$.name') as name FROM json_data; diff --git a/docs/reference/sql/group_by.md b/docs/reference/sql/group_by.md index f6bca64285..c0ba568f5e 100644 --- a/docs/reference/sql/group_by.md +++ b/docs/reference/sql/group_by.md @@ -71,4 +71,4 @@ FROM system_metrics GROUP BY dt ``` -Please refer to [date_trunc](./functions/overview.md#date_trunc) for more details. +Please refer to [date_trunc](./functions/df-functions.md#date_trunc) for more details. diff --git a/docs/user-guide/concepts/features-that-you-concern.md b/docs/user-guide/concepts/features-that-you-concern.md index 598ac67922..7c02b5b1a8 100644 --- a/docs/user-guide/concepts/features-that-you-concern.md +++ b/docs/user-guide/concepts/features-that-you-concern.md @@ -81,7 +81,7 @@ Yes. We offer [built-in functions](/reference/sql/functions/geo.md) for Geohash, ## Any JSON support? -See [JSON functions](/reference/sql/functions/overview.md#json-functions). +See [JSON functions](/reference/sql/functions/json.md). ## More Questions? diff --git a/docs/user-guide/deployments-administration/manage-data/basic-table-operations.md b/docs/user-guide/deployments-administration/manage-data/basic-table-operations.md index e77ff6dc3c..59e8e59e43 100644 --- a/docs/user-guide/deployments-administration/manage-data/basic-table-operations.md +++ b/docs/user-guide/deployments-administration/manage-data/basic-table-operations.md @@ -226,7 +226,7 @@ SHOW INDEXES FROM monitor; +---------+------------+------------+--------------+-------------+-----------+-------------+----------+--------+------+-------------------------+---------+---------------+---------+------------+ ``` -For more info about `SHOW` statement, please read the [SHOW reference](/reference/sql/show.md#show). +For more info about `SHOW` statement, please read the [SHOW reference](/reference/sql/show.md). ## List Existing Tables diff --git a/docs/user-guide/deployments-administration/monitoring/check-db-status.md b/docs/user-guide/deployments-administration/monitoring/check-db-status.md index 1ebc1411a8..be31a8d3a1 100644 --- a/docs/user-guide/deployments-administration/monitoring/check-db-status.md +++ b/docs/user-guide/deployments-administration/monitoring/check-db-status.md @@ -34,7 +34,7 @@ date: Sun, 26 Apr 2026 13:46:41 GMT For more information about the health check endpoint, please refer to [the Health endpoint](/reference/http-endpoints.md#health-check). -## Check GreptimeDB status +## Check GreptimeDB status {#check-greptimedb-runtime-status} You can use the `/status` endpoint to check the deployment status of GreptimeDB. diff --git a/docs/user-guide/deployments-administration/performance-tuning/design-table.md b/docs/user-guide/deployments-administration/performance-tuning/design-table.md index 6cb187bca1..48aaba63d9 100644 --- a/docs/user-guide/deployments-administration/performance-tuning/design-table.md +++ b/docs/user-guide/deployments-administration/performance-tuning/design-table.md @@ -378,10 +378,10 @@ CREATE TABLE IF NOT EXISTS `raw_logs` ( ``` The `message` field is full-text indexed using the `FULLTEXT INDEX` option. -See [fulltext column options](/reference/sql/create.md#fulltext-column-option) for more information. +See [fulltext column options](/reference/sql/create.md#index-column-option) for more information. Storing and querying structured logs usually have better performance than unstructured logs with full-text index. -It's recommended to [use Pipeline](/user-guide/logs/quick-start.md#create-a-pipeline) to convert logs into structured logs. +It's recommended to [use Pipeline](/user-guide/logs/use-custom-pipelines.md#create-a-custom-pipeline) to convert logs into structured logs. ### When to use index diff --git a/docs/user-guide/logs/use-custom-pipelines.md b/docs/user-guide/logs/use-custom-pipelines.md index dccb6b17cd..6722de74dc 100644 --- a/docs/user-guide/logs/use-custom-pipelines.md +++ b/docs/user-guide/logs/use-custom-pipelines.md @@ -198,7 +198,7 @@ SELECT * FROM custom_pipeline_logs WHERE status_code = 200 AND http_method = 'GE ### Full‑Text Search For the text fields `request_line` and `user_agent`, you can use `matches_term` function to search logs. -Remember, we created the full-text index for these two columns when [creating a pipeline](#create-a-pipeline). +Remember, we created the full-text index for these two columns when [creating a pipeline](#create-a-custom-pipeline). This allows for high-performance full-text searches. For example, query the logs with `request_line` containing `/index.html` or `/api/login`. diff --git a/docs/user-guide/manage-data/overview.md b/docs/user-guide/manage-data/overview.md index a193e51952..478b805584 100644 --- a/docs/user-guide/manage-data/overview.md +++ b/docs/user-guide/manage-data/overview.md @@ -24,7 +24,7 @@ Excessive updates may negatively impact query performance, even though the perfo #### Update all fields in a table By default, when updating data, all fields will be overwritten with the new values, -except for [InfluxDB line protocol](/user-guide/protocols/influxdb-line-protocol.md), which only [updates the specified fields](#overwrite-specific-fields-in-a-table). +except for [InfluxDB line protocol](/user-guide/protocols/influxdb-line-protocol.md), which only [updates the specified fields](#update-specific-fields-in-a-table). The following example using SQL demonstrates the behavior of overwriting all fields in a table. Assuming you have a table named `monitor` with the following schema. diff --git a/docusaurus.config.ts b/docusaurus.config.ts index 968343161c..2eca0e2c7e 100644 --- a/docusaurus.config.ts +++ b/docusaurus.config.ts @@ -31,6 +31,7 @@ const greptimePrismDarkTheme = { const locale = process.env.DOC_LANG || 'en'; const biel_project_id = process.env.BIEL_PROJECT_ID; +const isLinkCheck = process.env.DOCS_LINK_CHECK === 'true'; // Shared between docs preset and llms plugin to keep exclusions in sync const docsExcludePatterns = [ @@ -53,6 +54,10 @@ const availableLocales = isVersioningCommand ? ['en', 'zh'] : [locale]; // Get the latest version (first item in versions array) const latestVersion = versions[0]; const latestVersionNumber = parseFloat(latestVersion); +const linkCheckVersions = [ + 'current', + ...versions.filter(version => Number.parseInt(version, 10) >= 1), +]; const metaMap = { 'en': [ @@ -210,8 +215,8 @@ const config: Config = { projectName: 'docs', // Usually your repo name. onBrokenLinks: 'throw', - onBrokenMarkdownLinks: 'warn', - onBrokenAnchors: "ignore", + onBrokenMarkdownLinks: isLinkCheck ? 'throw' : 'warn', + onBrokenAnchors: isLinkCheck ? 'throw' : 'ignore', // Even if you don't use internationalization, you can use this field to set // useful metadata like html lang. For example, if your site is Chinese, you // may want to replace "en" with "zh-Hans". @@ -240,6 +245,7 @@ const config: Config = { routeBasePath: '/', exclude: docsExcludePatterns, showLastUpdateTime: true, + onlyIncludeVersions: isLinkCheck ? linkCheckVersions : undefined, versions: { current: { label: 'Nightly', diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/contributor-guide/datanode/wal.md b/i18n/zh/docusaurus-plugin-content-docs/current/contributor-guide/datanode/wal.md index 4f6b4cbe5c..529adcdf50 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/contributor-guide/datanode/wal.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/contributor-guide/datanode/wal.md @@ -5,6 +5,8 @@ description: 介绍了 GreptimeDB 的预写日志(WAL)机制,包括其命 # 预写日志 + + ## 介绍 我们的存储引擎受到了日志结构合并树(Log-structured Merge Tree,LSMT)的启发。对数据的变更操作直接应用于 MemTable 而不是持久化到磁盘上的数据页,这显著提高了性能,但也带来了持久化相关的问题,特别是在 Datanode 意外崩溃时。与所有类似 LSMT 的存储引擎一样,GreptimeDB 使用预写日志(Write-Ahead Log,WAL)来确保数据被可靠地持久化,并且保证崩溃时的数据完整性。 diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/contributor-guide/frontend/table-sharding.md b/i18n/zh/docusaurus-plugin-content-docs/current/contributor-guide/frontend/table-sharding.md index 40f91666a0..63a8ac10a6 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/contributor-guide/frontend/table-sharding.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/contributor-guide/frontend/table-sharding.md @@ -7,6 +7,8 @@ description: 介绍 GreptimeDB 中表数据的分片方法,包括分区和 Reg 对于任何分布式数据库来说,数据的分片都是必不可少的。本文将描述 GreptimeDB 中的表数据如何进行分片。 + + ## 分区 有关创建分区表的语法,请参阅用户指南中的[表分片](/user-guide/deployments-administration/manage-data/table-sharding.md)部分。 diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/contributor-guide/metasrv/selector.md b/i18n/zh/docusaurus-plugin-content-docs/current/contributor-guide/metasrv/selector.md index 13aac3ad9f..9048e0daa4 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/contributor-guide/metasrv/selector.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/contributor-guide/metasrv/selector.md @@ -13,6 +13,8 @@ description: 介绍 Metasrv 中的 Selector,包括其类型和配置方法。 在 `Metasrv` 中存在一个特定的场景。当 `Frontend` 向 `Metasrv` 发送建表请求时,`Metasrv` 会创建一个路由表(表的创建细节不在这里赘述)。在创建路由表时,`Metasrv` 需要选择适当的 `Datanode`s,这时候就需要用到 `Selector`。 + + ## Selector 类型 `Metasrv` 目前提供以下几种类型的 `Selectors`: diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/db-cloud-shared/migrate/migrate-from-influxdb.md b/i18n/zh/docusaurus-plugin-content-docs/current/db-cloud-shared/migrate/migrate-from-influxdb.md index 86b00adaf8..a579baecdb 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/db-cloud-shared/migrate/migrate-from-influxdb.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/db-cloud-shared/migrate/migrate-from-influxdb.md @@ -34,6 +34,8 @@ SHOW CREATE TABLE measurement_name; + + ## 写入数据 GreptimeDB 兼容 InfluxDB 的行协议格式,包括 v1 和 v2。 @@ -54,6 +56,8 @@ GreptimeDB 支持 InfluxDB 行协议也意味着 GreptimeDB 与 Telegraf 兼容 + + ### 客户端库 使用 InfluxDB 客户端库写入数据到 GreptimeDB 非常直接且简单。 diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/reference/command-lines/utilities/metadata-interaction.md b/i18n/zh/docusaurus-plugin-content-docs/current/reference/command-lines/utilities/metadata-interaction.md index 326aa34c4f..522a13544e 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/reference/command-lines/utilities/metadata-interaction.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/reference/command-lines/utilities/metadata-interaction.md @@ -111,6 +111,8 @@ greptime cli meta put table route [OPTIONS] | `--catalog-name ` | 所属 catalog 的名称 | greptime | | `--value-stdin` | 从标准输入读取 JSON 编码的 `TableRouteValue`(必填) | - | + + ## 删除键值对 ### 命令语法 diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/reference/http-endpoints.md b/i18n/zh/docusaurus-plugin-content-docs/current/reference/http-endpoints.md index 846c5482f6..af70cc67c6 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/reference/http-endpoints.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/reference/http-endpoints.md @@ -18,7 +18,7 @@ description: 介绍 GreptimeDB 中各种 HTTP 路径及其用法的完整列表 - **描述**: 提供一个健康检查端点以验证服务器是否正在运行。 - **用法**: 访问此端点以检查服务器的健康状态。 -请参考[检查 GreptimeDB 健康状态文档](/enterprise/deployments-administration/monitoring/check-db-status.md#查看-greptimedb-是否正常运行)获取示例。 +请参考[检查 GreptimeDB 健康状态文档](/user-guide/deployments-administration/monitoring/check-db-status.md#check-if-greptimedb-is-running-normally)获取示例。 ### 状态 @@ -27,7 +27,7 @@ description: 介绍 GreptimeDB 中各种 HTTP 路径及其用法的完整列表 - **描述**: 检索服务器的当前状态。 - **用法**: 使用此端点获取服务器状态信息。 -请参考[检查 GreptimeDB 状态文档](/enterprise/deployments-administration/monitoring/check-db-status.md#查看-greptimedb-的部署状态)获取示例。 +请参考[检查 GreptimeDB 状态文档](/user-guide/deployments-administration/monitoring/check-db-status.md#check-greptimedb-runtime-status)获取示例。 ### 指标 diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/reference/pipeline/pipeline-config.md b/i18n/zh/docusaurus-plugin-content-docs/current/reference/pipeline/pipeline-config.md index edee728ec0..fb1c257c87 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/reference/pipeline/pipeline-config.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/reference/pipeline/pipeline-config.md @@ -969,6 +969,8 @@ Transform 由一个或多个配置组成,每个配置包含以下字段: - `on_failure`(可选): 转换失败时的处理方式 - `default`(可选): 默认值 + + ### 版本 2 中的 Transform 在最初的 pipeline 版本中,你需要在 transform 中手动指定所有的字段,来将它们持久化到数据库中。 diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/reference/sql-tools.md b/i18n/zh/docusaurus-plugin-content-docs/current/reference/sql-tools.md index bd6436e05e..65bdc2d3b2 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/reference/sql-tools.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/reference/sql-tools.md @@ -214,7 +214,7 @@ GreptimeDB 使用 SQL 作为主要查询语言,并支持许多流行的 SQL } ``` - 如果你正在使用 [高层级 API](/user-guide/ingest-data/for-iot/grpc-sdks/go.md#高层级-api) 来插入数据,你可以在模型中同时声明 GORM 和 GreptimeDB Tag。 + 如果你正在使用 [高层级 API](/user-guide/ingest-data/for-iot/grpc-sdks/go.md#high-level-api) 来插入数据,你可以在模型中同时声明 GORM 和 GreptimeDB Tag。 ```go type CpuMetric struct { diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/reference/sql/alter.md b/i18n/zh/docusaurus-plugin-content-docs/current/reference/sql/alter.md index f546423119..c1a9a71bf7 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/reference/sql/alter.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/reference/sql/alter.md @@ -181,6 +181,8 @@ ALTER TABLE monitor MODIFY COLUMN load_15 DROP DEFAULT; 删除默认值后,该列将使用 `NULL` 作为默认值。数据库只允许对可为空的列删除默认值。 + + ### 修改表的参数 `ALTER TABLE` 语句也可以用来更改表的选项。 @@ -311,6 +313,8 @@ ALTER TABLE sensor_readings SPLIT PARTITION ( 必须开启共享对象存储和 GC,并确保所有 datanode 都能访问同一对象存储后再执行这些语句。 ::: + + ### 创建列的索引 在列上启用倒排索引: diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/reference/sql/case.md b/i18n/zh/docusaurus-plugin-content-docs/current/reference/sql/case.md index 9bcb03ca6c..be7638c604 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/reference/sql/case.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/reference/sql/case.md @@ -30,7 +30,7 @@ END ### 在 `SELECT` 中使用 `CASE` 在 `SELECT` 子句中,你可以使用 `CASE` 语句根据条件创建新列。 -请参阅查询数据指南中的[示例](/user-guide/query-data/sql.md#case)。 +请参阅查询数据指南中的[示例](/user-guide/query-data/sql.md#case-expression)。 你还可以将 `CASE` 与 `SUM` 等函数一起使用,以有条件地聚合数据。 例如,你可以计算状态码为 200 和 404 的日志总数: diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/reference/sql/compatibility.md b/i18n/zh/docusaurus-plugin-content-docs/current/reference/sql/compatibility.md index 56c899fd36..997bb0015d 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/reference/sql/compatibility.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/reference/sql/compatibility.md @@ -13,12 +13,12 @@ GreptimeDB 支持的 SQL 是 ANSI SQL 的子集,并且拥有一些特有的扩 * GreptimeDB 是原生的分布式数据库,因此分布式表的建表语句支持分区规则,也请参考[CREATE](./create.md) 建表语法一节。 2. 插入新数据:与 ANSI SQL 语法一致,但是强制要求提供 `TIME INDEX` 列值(或默认值)。 3. 更新:不支持 `UPDATE` 语法,但是在 `INSERT` 的时候,如果主键和 `TIME INDEX` 对应的列值一样,那么后续插入的行将覆盖以前写入的行,从而变相实现更新。 - * 从 0.8 开始,GreptimeDB 支持 [append 模式](/reference/sql/create.md#创建-Append-Only-表),创建时指定`append_mode = "true"` 选项的表将保留重复的数据行。 - * GreptimeDB 支持 [merge 模式](/reference/sql/create.md#create-an-append-only-table),该模式使用 `merge_mode="last_non_null"` 选项创建表,允许部分更新字段。 + * 从 0.8 开始,GreptimeDB 支持 [append 模式](/reference/sql/create.md#create-an-append-only-table),创建时指定`append_mode = "true"` 选项的表将保留重复的数据行。 + * GreptimeDB 支持 [merge 模式](/reference/sql/create.md#create-a-table-with-merge-mode),该模式使用 `merge_mode="last_non_null"` 选项创建表,允许部分更新字段。 4. 查询:查询语法兼容 ANSI SQL,存在部分功能差异和缺失 * 从 v0.9.0 开始支持[视图](/user-guide/query-data/view.md)。 * TQL 语法扩展:TQL 子命令支持在 SQL 中执行 PromQL,详细请参考 [TQL](./tql.md) 一节。 - * [Range Query](/reference/sql/range.md#range-query) 支持按照指定窗口来查询和聚合时序数据。 + * [Range Query](/reference/sql/range.md) 支持按照指定窗口来查询和聚合时序数据。 5. 删除数据:语法与 ANSI SQL 基本一致。 6. 他项: * 标识符,如表名,列名等,约束与 ANSI SQL 类似,大小写敏感,遇到特殊字符或者大写需要用双引号括起来。 diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/reference/sql/create.md b/i18n/zh/docusaurus-plugin-content-docs/current/reference/sql/create.md index 7365c64522..d1726592f5 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/reference/sql/create.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/reference/sql/create.md @@ -144,6 +144,8 @@ ENGINE = engine WITH([TTL | storage | ...] = expr, ...) GreptimeDB 提供了丰富的索引实现来加速查询,请在[索引](/user-guide/manage-data/data-index.md)章节查看更多信息。 + + ### 表选项 用户可以使用 `WITH` 添加表选项。有效的选项包括以下内容: @@ -217,6 +219,8 @@ with( ); ``` + + #### 创建 Append-Only 表 创建一个 append-only 表来关闭去重 ```sql @@ -226,6 +230,8 @@ CREATE TABLE IF NOT EXISTS temperatures( ) with('append_mode'='true'); ``` + + #### 创建带有 merge 模式的表 创建一个带有 `last_row` merge 模式的表,这是默认的 merge 模式。 @@ -407,6 +413,8 @@ CREATE TABLE system_metrics ( Query OK, 0 rows affected (0.01 sec) ``` + + #### `INDEX` 列选项 更多关于索引配置、性能对比和使用指南的信息,请参考[索引](/user-guide/manage-data/data-index.md)章节。 @@ -542,7 +550,7 @@ CREATE [OR REPLACE] VIEW [ IF NOT EXISTS ] AS select_statement ``` -用于创建或更新视图,请阅读[视图用户指南](/user-guide/query-data/view.md#视图)。 +用于创建或更新视图,请阅读[视图用户指南](/user-guide/query-data/view.md#view)。 ## 创建 Trigger diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/reference/sql/data-types.md b/i18n/zh/docusaurus-plugin-content-docs/current/reference/sql/data-types.md index b54caf9757..bacc96e29c 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/reference/sql/data-types.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/reference/sql/data-types.md @@ -79,6 +79,8 @@ SELECT * FROM decimals; 使用 MySQL/PostgreSQL 协议写入时间戳字符串字面量时,值的范围限制为 '0001-01-01 00:00:00' 到 '9999-12-31 23:59:59'。 ::: + + ### Interval 类型详解 `Interval` 类型用于需要跟踪和操作时间间隔的场景。它的编写语法如下: @@ -232,6 +234,8 @@ public=> SELECT INTERVAL '1 year 2 month'; (1 row) ``` + + ## JSON 类型(实验功能) :::warning @@ -265,7 +269,7 @@ SELECT * FROM json_data; ### 查询 JSON 数据 -您可以直接查询 JSON 数据,也可以使用 GreptimeDB 提供的 [JSON 函数](./functions/overview.md#json-functions) 提取特定字段。以下是一个示例: +您可以直接查询 JSON 数据,也可以使用 GreptimeDB 提供的 [JSON 函数](./functions/json.md) 提取特定字段。以下是一个示例: ```sql SELECT json_get_string(my_json, '$.name') as name FROM json_data; diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/reference/sql/group_by.md b/i18n/zh/docusaurus-plugin-content-docs/current/reference/sql/group_by.md index c7b5cfc0f1..862c097dc1 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/reference/sql/group_by.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/reference/sql/group_by.md @@ -70,4 +70,4 @@ FROM system_metrics GROUP BY dt ``` -请参考 [date_trunc](./functions/overview.md#date_trunc) 获取更多信息。 +请参考 [date_trunc](./functions/df-functions.md#date_trunc) 获取更多信息。 diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/reference/sql/range.md b/i18n/zh/docusaurus-plugin-content-docs/current/reference/sql/range.md index 728648c0a1..2105aa435d 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/reference/sql/range.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/reference/sql/range.md @@ -39,6 +39,8 @@ INTERVAL := TIME_INTERVAL | ( INTERVAL expr ) - 关键字 `FILL`,可以跟在一个 Range 表达式后,详情请见[FILL Option](#fill-选项) 。 + + ## `FILL` 选项 `FILL` 选项指定了在某个聚合的时间片上没有数据,或者聚合字段的值为空时的数据填充方法。 diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/user-guide/concepts/features-that-you-concern.md b/i18n/zh/docusaurus-plugin-content-docs/current/user-guide/concepts/features-that-you-concern.md index 37b8207fd8..0b8d79a095 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/user-guide/concepts/features-that-you-concern.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/user-guide/concepts/features-that-you-concern.md @@ -17,7 +17,7 @@ GreptimeDB 将所有可观测数据——metrics、logs、traces——作为带 ## 支持删除数据吗? -支持,参见[删除数据](/user-guide/ingest-data/overview.md#删除数据)。 +支持,参见[删除数据](/user-guide/manage-data/overview.md#删除数据)。 ## 可以按表设置 TTL 或保留策略吗? @@ -79,7 +79,7 @@ GreptimeDB 通过多层手段解决高基数挑战: ## 支持 JSON 数据吗? -支持,参见 [JSON 函数](/reference/sql/functions/overview.md#json-functions)。 +支持,参见 [JSON 函数](/reference/sql/functions/json.md)。 ## 更多问题? diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/user-guide/deployments-administration/configuration.md b/i18n/zh/docusaurus-plugin-content-docs/current/user-guide/deployments-administration/configuration.md index 8a96ce4a83..7edffb10ea 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/user-guide/deployments-administration/configuration.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/user-guide/deployments-administration/configuration.md @@ -29,6 +29,8 @@ greptime standalone start --http-addr 127.0.0.1:4000 有关 Greptime 命令行支持的所有选项,请参阅 [GreptimeDB 命令行界面](/reference/command-lines/overview.md)。 + + ### 配置文件选项 你可以在 TOML 文件中指定配置项。 @@ -153,6 +155,8 @@ concurrent_query_limiter_timeout = "100ms" | `max_concurrent_queries` | 整数 | `0` | Datanode 上允许同时运行的最大读取查询数量。设置为 `0` 表示禁用限制。 | | `concurrent_query_limiter_timeout` | 字符串 | `100ms` | 当达到 `max_concurrent_queries` 后,查询等待可用名额的最长时间。如果超时后仍然没有可用名额,查询将失败。 | + + ### 协议选项 协议选项适用于 `frontend` 和 `standalone` 子命令,它指定了协议服务器地址和其他协议相关的选项。 @@ -312,6 +316,8 @@ max_inflight_requests = 3000 parallelism = 0 ``` + + ### 存储选项 `存储`选项在 `datanode` 和 `standalone` 模式下有效,它指定了数据库数据目录和其他存储相关的选项。 @@ -465,6 +471,8 @@ default_ratio = 1.0 如何使用分布式追踪,请参考 [Tracing](/user-guide/deployments-administration/monitoring/tracing.md#教程使用-jaeger-追踪-greptimedb-调用链路) + + ### Region 引擎选项 datanode 和 standalone 在 `[region_engine]` 部分可以配置不同存储引擎的对应参数。目前可以配置 `mito` 和 `metric` 存储引擎的选项。 @@ -643,6 +651,8 @@ default_timezone = "UTC" `default_timezone` 的值可以是任何时区名称,例如 `Europe/Berlin` 或 `Asia/Shanghai`。 有关客户端时区如何影响数据的写入和查询,请参阅[时区](/user-guide/timezone.md#时区对-sql-语句的影响)文档。 + + ### 仅限于 Metasrv 的配置 ```toml diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/user-guide/deployments-administration/deploy-on-kubernetes/common-helm-chart-configurations.md b/i18n/zh/docusaurus-plugin-content-docs/current/user-guide/deployments-administration/deploy-on-kubernetes/common-helm-chart-configurations.md index 818fdc592e..11376de5d3 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/user-guide/deployments-administration/deploy-on-kubernetes/common-helm-chart-configurations.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/user-guide/deployments-administration/deploy-on-kubernetes/common-helm-chart-configurations.md @@ -480,6 +480,8 @@ debugPod: cpu: 200m ``` + + ### 配置 Metasrv 后端存储 #### 使用 MySQL 和 PostgreSQL 作为后端存储 @@ -585,6 +587,8 @@ meta: - `etcd.endpoints`: etcd 服务地址。 - `etcd.storeKeyPrefix`: etcd 存储 key 前缀。所有 key 都会被存储在这个前缀下。如果你希望使用一个 etcd 集群为多个 GreptimeDB 集群提供服务,你可以为每个 GreptimeDB 集群配置不同的存储 key 前缀。这仅用于测试和调试目的。 + + ### 启用 Region Failover 你可以通过 `meta.enableRegionFailover` 字段启用 Region Failover。在启用 Region Failover 之前,请确保你的部署满足 [Region Failover](/user-guide/deployments-administration/manage-data/region-failover.md) 文档中的先决条件。如果你的配置不满足条件,**Operator 将无法部署集群组件**。 diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/user-guide/deployments-administration/deploy-on-kubernetes/deploy-greptimedb-cluster.md b/i18n/zh/docusaurus-plugin-content-docs/current/user-guide/deployments-administration/deploy-on-kubernetes/deploy-greptimedb-cluster.md index 843c93166b..4547556995 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/user-guide/deployments-administration/deploy-on-kubernetes/deploy-greptimedb-cluster.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/user-guide/deployments-administration/deploy-on-kubernetes/deploy-greptimedb-cluster.md @@ -227,6 +227,8 @@ http://etcd-2.etcd-headless.etcd-cluster.svc.cluster.local:2379 is healthy: succ ``` + + ## 配置 `values.yaml` `values.yaml` 文件设置了 GreptimeDB 的一些参数和配置,是定义 helm chart 的关键。 @@ -393,6 +395,8 @@ kubectl -n default port-forward --address 0.0.0.0 svc/mycluster-frontend 4000:40 如果你想使用其他工具如 `mysql` 或 `psql` 来连接 GreptimeDB 集群,你可以参考 [快速入门](/getting-started/quick-start.md)。 + + ## 删除集群 :::danger diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/user-guide/deployments-administration/manage-data/basic-table-operations.md b/i18n/zh/docusaurus-plugin-content-docs/current/user-guide/deployments-administration/manage-data/basic-table-operations.md index 448c6ec5b3..031848dda9 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/user-guide/deployments-administration/manage-data/basic-table-operations.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/user-guide/deployments-administration/manage-data/basic-table-operations.md @@ -68,6 +68,8 @@ SHOW DATABASES LIKE 'p%'; USE test; ``` + + ## 创建表 :::tip NOTE @@ -222,7 +224,7 @@ SHOW INDEXES FROM monitor; +---------+------------+------------+--------------+-------------+-----------+-------------+----------+--------+------+-------------------------+---------+---------------+---------+------------+ ``` -有关 `SHOW` 语句的更多信息,请阅读 [SHOW 参考](/reference/sql/show.md#show)。 +有关 `SHOW` 语句的更多信息,请阅读 [SHOW 参考](/reference/sql/show.md)。 ## 列出现有的表 diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/user-guide/deployments-administration/manage-data/table-sharding.md b/i18n/zh/docusaurus-plugin-content-docs/current/user-guide/deployments-administration/manage-data/table-sharding.md index 9c6f130f00..cb92bbf7f8 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/user-guide/deployments-administration/manage-data/table-sharding.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/user-guide/deployments-administration/manage-data/table-sharding.md @@ -39,6 +39,8 @@ GreptimeDB 中的一个 region 具有相对固定的吞吐量, 有关分区和 region 之间关系的更多信息,请参阅贡献者指南中的[表分片](/contributor-guide/frontend/table-sharding.md)部分。 + + ## 分区 在 GreptimeDB 中,表可以按列值范围进行水平分区。 diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/user-guide/deployments-administration/monitoring/check-db-status.md b/i18n/zh/docusaurus-plugin-content-docs/current/user-guide/deployments-administration/monitoring/check-db-status.md index c0a8e300a9..72305acc12 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/user-guide/deployments-administration/monitoring/check-db-status.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/user-guide/deployments-administration/monitoring/check-db-status.md @@ -8,6 +8,8 @@ description: 通过 HTTP 接口检查 GreptimeDB 的健康状态、部署状态 GreptimeDB 包含了一系列的 HTTP 接口可供查询 GreptimeDB 的运行情况。 以下发起的 HTTP 请求均假定 GreptimeDB 运行在节点 `127.0.0.1` 上,其 HTTP 服务监听默认的 `4000` 端口。 + + ## 查看 GreptimeDB 是否正常运行: 你可以使用 `/health` 接口检查 GreptimeDB 是否正常运行。 @@ -34,6 +36,8 @@ date: Sun, 26 Apr 2026 13:46:41 GMT 有关健康检查接口的更多信息,请参考[健康检查接口](/reference/http-endpoints.md#健康检查)。 + + ## 查看 GreptimeDB 的部署状态 你可以使用 `/status` 接口检查 GreptimeDB 的部署状态。 diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/user-guide/deployments-administration/monitoring/cluster-monitoring-deployment.md b/i18n/zh/docusaurus-plugin-content-docs/current/user-guide/deployments-administration/monitoring/cluster-monitoring-deployment.md index a59a4bfad0..bfebb01456 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/user-guide/deployments-administration/monitoring/cluster-monitoring-deployment.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/user-guide/deployments-administration/monitoring/cluster-monitoring-deployment.md @@ -103,7 +103,7 @@ mycluster-monitor-standalone-0 1/1 Running 0 6m35s kubectl -n default port-forward svc/mycluster-grafana 18080:80 ``` -请参考[访问 Grafana 仪表盘](#访问-grafana仪表盘)章节来查看相应的数据面板。 +请参考[访问 Grafana 仪表盘](#访问-grafana-仪表盘)章节来查看相应的数据面板。 ## 配置监控数据的收集 diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/user-guide/deployments-administration/performance-tuning/design-table.md b/i18n/zh/docusaurus-plugin-content-docs/current/user-guide/deployments-administration/performance-tuning/design-table.md index 427cbcbca5..8a5b0264e3 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/user-guide/deployments-administration/performance-tuning/design-table.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/user-guide/deployments-administration/performance-tuning/design-table.md @@ -371,10 +371,10 @@ CREATE TABLE IF NOT EXISTS `raw_logs` ( ``` `message` 字段使用 `FULLTEXT INDEX` 选项进行全文索引。 -更多信息请参见[fulltext 列选项](/reference/sql/create.md#fulltext-列选项)。 +更多信息请参见[fulltext 列选项](/reference/sql/create.md#index-column-option)。 存储和查询结构化日志通常比带有全文索引的非结构化日志性能更好。 -建议[使用 Pipeline](/user-guide/logs/quick-start.md#创建-pipeline) 将日志转换为结构化日志。 +建议[使用 Pipeline](/user-guide/logs/use-custom-pipelines.md#create-a-pipeline) 将日志转换为结构化日志。 ### 何时使用索引 diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/user-guide/flow-computation/continuous-aggregation.md b/i18n/zh/docusaurus-plugin-content-docs/current/user-guide/flow-computation/continuous-aggregation.md index 63182a60a2..be98ddcde5 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/user-guide/flow-computation/continuous-aggregation.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/user-guide/flow-computation/continuous-aggregation.md @@ -398,6 +398,8 @@ SELECT * FROM ngx_distribution; 6 rows in set (0.00 sec) ``` + + ## 将 TQL 与 Flow 结合使用进行高级时序分析 :::warning 实验性特性 diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/user-guide/flow-computation/manage-flow.md b/i18n/zh/docusaurus-plugin-content-docs/current/user-guide/flow-computation/manage-flow.md index 0f68892702..6978f321ca 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/user-guide/flow-computation/manage-flow.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/user-guide/flow-computation/manage-flow.md @@ -223,6 +223,8 @@ SELECT AGGR_FUNCTION(column1, column2,..) [, TIME_WINDOW_FUNCTION() as time_wind 有关如何在实时分析、监控和仪表板中使用持续聚合的更多示例,请参阅[持续聚合](./continuous-aggregation.md)。 + + ### 定义时间窗口 时间窗口是持续聚合查询的重要属性。 diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/user-guide/ingest-data/for-iot/grpc-sdks/go.md b/i18n/zh/docusaurus-plugin-content-docs/current/user-guide/ingest-data/for-iot/grpc-sdks/go.md index 5ee1b429dd..99246c8d1f 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/user-guide/ingest-data/for-iot/grpc-sdks/go.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/user-guide/ingest-data/for-iot/grpc-sdks/go.md @@ -191,6 +191,8 @@ if err != nil { affected, err := cli.CloseStream(ctx) ``` + + ## 高级 API SDK 的高级 API 使用 ORM 风格的对象写入数据, @@ -247,7 +249,7 @@ affected, err := cli.CloseStream(ctx) ## 插入 JSON 类型的数据 -GreptimeDB 支持使用 [JSON 类型数据](/reference/sql/data-types.md#json-类型) 存储复杂的数据结构。 +GreptimeDB 支持使用 [JSON 类型数据](/reference/sql/data-types.md#json-type-experimental) 存储复杂的数据结构。 使用此 ingester 库,你可以通过字符串值插入 JSON 数据。 假如你有一个名为 `sensor_readings` 的表,并希望添加一个名为 `attributes` 的 JSON 列, 请参考以下代码片段。 diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/user-guide/ingest-data/for-iot/grpc-sdks/java.md b/i18n/zh/docusaurus-plugin-content-docs/current/user-guide/ingest-data/for-iot/grpc-sdks/java.md index 069249bfd7..e9210acb4c 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/user-guide/ingest-data/for-iot/grpc-sdks/java.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/user-guide/ingest-data/for-iot/grpc-sdks/java.md @@ -164,7 +164,7 @@ table.complete(); CompletableFuture> future = client.write(table); ``` -GreptimeDB 支持使用 [JSON 类型数据](/reference/sql/data-types.md#json-类型) 存储复杂的数据结构。你可以在表结构中定义 JSON 列,并使用 Map 对象插入数据: +GreptimeDB 支持使用 [JSON 类型数据](/reference/sql/data-types.md#json-type-experimental) 存储复杂的数据结构。你可以在表结构中定义 JSON 列,并使用 Map 对象插入数据: ```java // 为 sensor_readings 构建表结构 diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/user-guide/ingest-data/for-iot/sql.md b/i18n/zh/docusaurus-plugin-content-docs/current/user-guide/ingest-data/for-iot/sql.md index 3023b6632b..42715296ef 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/user-guide/ingest-data/for-iot/sql.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/user-guide/ingest-data/for-iot/sql.md @@ -73,6 +73,8 @@ VALUES 通过上面的语句,我们成功的向 `monitor` 表中插入了六条数据。请参考 [`INSERT`](/reference/sql/insert.md) 获得更多写入数据的相关信息。 + + ## 时区 SQL 客户端中指定的时区将影响没有时区信息的字符串格式的时间戳。 diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/user-guide/ingest-data/for-observability/kafka.md b/i18n/zh/docusaurus-plugin-content-docs/current/user-guide/ingest-data/for-observability/kafka.md index 32b85f6a60..4514c7c639 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/user-guide/ingest-data/for-observability/kafka.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/user-guide/ingest-data/for-observability/kafka.md @@ -49,6 +49,8 @@ tls = {} 当 Vector 使用 `decoding.codec = "influxdb"` 解析 Kafka 消息,并通过 `greptimedb_metrics` sink 写入时,每个 InfluxDB field 都会被转换为一个 metric 名称。例如,`census bees=23` 会写入名为 `census_bees` 的表,值存储在 `val` 列中。 + + ## 日志 开发人员通常处理两种类型的日志:JSON 日志和纯文本日志。 diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/user-guide/ingest-data/for-observability/loki.md b/i18n/zh/docusaurus-plugin-content-docs/current/user-guide/ingest-data/for-observability/loki.md index 4a9efeda75..fc02b2d50c 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/user-guide/ingest-data/for-observability/loki.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/user-guide/ingest-data/for-observability/loki.md @@ -132,6 +132,8 @@ WITH( 1 row in set (0.00 sec) ``` + + ## 在 Loki Push API 中使用 pipeline GreptimeDB 支持使用 pipeline 来处理 Loki Push 请求。 diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/user-guide/ingest-data/for-observability/prometheus.md b/i18n/zh/docusaurus-plugin-content-docs/current/user-guide/ingest-data/for-observability/prometheus.md index eafabaecb7..8b637d4513 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/user-guide/ingest-data/for-observability/prometheus.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/user-guide/ingest-data/for-observability/prometheus.md @@ -7,6 +7,8 @@ description: 介绍如何将 GreptimeDB 作为 Prometheus 的长期存储解决 GreptimeDB 可以作为 Prometheus 的长期存储解决方案,提供无缝集成体验。 + + ## 配置 Remote Write ### Prometheus 配置文件 @@ -42,6 +44,8 @@ remote_read: 如果你使用 Vector ,请在 Vector 配置文件(`vector.toml`)中配置 Remote Write。有关更多信息,请参阅 [Vector 文档](vector.md#使用-prometheus-remote-write-协议). + + ## 数据模型 在 GreptimeDB 的[数据模型](/user-guide/concepts/data-model.md)中,数据被组织成具有 tag、time index 和 field 的表。 @@ -151,6 +155,8 @@ WHERE greptime_timestamp > '2024-08-07 03:27:26.964000' AND job = 'job1'; ``` + + ### 在 GreptimeDB 集群上使用 metric engine 在使用 Prometheus remote write 写入 GreptimeDB 集群时,用户可能注意到集群中只有 diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/user-guide/ingest-data/for-observability/vector.md b/i18n/zh/docusaurus-plugin-content-docs/current/user-guide/ingest-data/for-observability/vector.md index 24724bbb48..8e0887fa3e 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/user-guide/ingest-data/for-observability/vector.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/user-guide/ingest-data/for-observability/vector.md @@ -124,6 +124,8 @@ GreptimeDB 支持多种日志数据写入方式,包括: 我们强烈建议所有的用户使用 `greptimedb_logs` sink 来写入日志数据,因为它是为 GreptimeDB 优化的,能够更好地支持 GreptimeDB 的特性。 并且推荐开启各种协议的压缩功能,以提高数据传输效率。 + + ### 使用 `greptimedb_logs` sink (推荐) ```toml diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/user-guide/logs/manage-pipelines.md b/i18n/zh/docusaurus-plugin-content-docs/current/user-guide/logs/manage-pipelines.md index d4b0618da6..5afe3cb1d9 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/user-guide/logs/manage-pipelines.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/user-guide/logs/manage-pipelines.md @@ -15,6 +15,8 @@ description: 介绍如何在 GreptimeDB 中管理 Pipeline,包括创建、删 在使用 HTTP API 进行 Pipeline 管理时,你需要提供有效的鉴权信息。 请参考[鉴权](/user-guide/protocols/http.md#鉴权)文档了解详细信息。 + + ## 上传 Pipeline GreptimeDB 提供了专用的 HTTP 接口用于创建 Pipeline。 diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/user-guide/logs/quick-start.md b/i18n/zh/docusaurus-plugin-content-docs/current/user-guide/logs/quick-start.md index 9f7ca6b7cd..d1360fad09 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/user-guide/logs/quick-start.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/user-guide/logs/quick-start.md @@ -18,6 +18,8 @@ GreptimeDB 提供了强大的基于 pipeline 的日志写入系统。 - 灵活支持变化的日志结构 - 需要最少的配置即可开始使用 + + ## 直接通过 HTTP 写入日志 GreptimeDB 日志写入最简单的方法是通过使用 `greptime_identity` pipeline 发送 HTTP 请求。 diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/user-guide/logs/use-custom-pipelines.md b/i18n/zh/docusaurus-plugin-content-docs/current/user-guide/logs/use-custom-pipelines.md index 00ae5467e0..2b6efa907a 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/user-guide/logs/use-custom-pipelines.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/user-guide/logs/use-custom-pipelines.md @@ -28,6 +28,8 @@ GreptimeDB 能够将日志自动解析和转换为多列的结构化数据, 127.0.0.1 - - [25/May/2024:20:16:37 +0000] "GET /index.html HTTP/1.1" 200 612 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36" ``` + + ## 创建自定义 Pipeline GreptimeDB 提供 HTTP 接口用于创建 pipeline。 @@ -103,6 +105,8 @@ transform: 有关 pipeline 配置选项的详细信息, 请参考 [Pipeline 配置](/reference/pipeline/pipeline-config.md) 文档。 + + ## 上传 Pipeline 执行以下命令上传 pipeline 配置: @@ -124,6 +128,8 @@ curl -X "POST" \ 所有 pipeline 都存储在 `greptime_private.pipelines` 表中。 参考[查询 Pipeline](manage-pipelines.md#查询-pipeline) 来查看 pipeline 数据。 + + ## 使用 Pipeline 写入日志 以下示例使用 `nginx_pipeline` pipeline 将日志写入 `custom_pipeline_logs` 表来格式化和转换日志消息: diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/user-guide/manage-data/data-index.md b/i18n/zh/docusaurus-plugin-content-docs/current/user-guide/manage-data/data-index.md index d04ce525ee..9475c00592 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/user-guide/manage-data/data-index.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/user-guide/manage-data/data-index.md @@ -41,6 +41,8 @@ CREATE TABLE monitoring_data ( 需要注意的是,当列的基数非常大时,倒排索引可能会带来较高的维护成本,导致内存占用增加和索引体积膨胀。这种情况下,建议考虑使用跳数索引作为替代方案。 + + ### 跳数索引 跳数索引是专为列式存储系统(如 GreptimeDB)优化设计的索引类型。它通过维护数据块内值域范围的元数据,使查询引擎能够在进行范围查询时快速跳过不相关的数据块。与其他索引相比,跳数索引的存储开销相对较小。 diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/user-guide/protocols/http.md b/i18n/zh/docusaurus-plugin-content-docs/current/user-guide/protocols/http.md index 3a8ceb1629..46c8d6563a 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/user-guide/protocols/http.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/user-guide/protocols/http.md @@ -18,6 +18,8 @@ API 的 Base URL 是 `http(s)://:/`。 ## 通用 Headers + + ### 鉴权 假设你已经正确设置了数据库[鉴权](/user-guide/deployments-administration/authentication/overview.md), @@ -111,6 +113,8 @@ http://localhost:4000/v1/sql 请参考 [Admin APIs 接口](/reference/http-endpoints.md#管理-api)文档以获取更多信息。 + + ## POST SQL 语句 要通过 HTTP API 向 GreptimeDB 服务器提交 SQL 语句,请使用以下格式: @@ -153,6 +157,8 @@ curl -X POST \ - `sql`: SQL 语句。必填。 + + ### 响应 响应是一个 JSON 对象,包含以下字段: diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/user-guide/query-data/promql.md b/i18n/zh/docusaurus-plugin-content-docs/current/user-guide/query-data/promql.md index bb21e059a0..7aac91bd04 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/user-guide/query-data/promql.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/user-guide/query-data/promql.md @@ -7,6 +7,8 @@ description: 介绍 GreptimeDB 对 Prometheus 查询语言(PromQL)的支持 GreptimeDB 可以作为 Grafana 中 Prometheus 的替代品,因为 GreptimeDB 支持 PromQL(Prometheus Query Language)。GreptimeDB 在 Rust 中重新实现了 PromQL,并通过接口将能力开放,包括 Prometheus 的 HTTP API、GreptimeDB 的 HTTP API 和 SQL 接口。 + + ## Prometheus 的 HTTP API @@ -286,4 +288,4 @@ PromQL 的时间戳精度受制于查询语法的限制,最高只支持毫秒 - 不支持: -无 \ No newline at end of file +无 diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/user-guide/query-data/sql.md b/i18n/zh/docusaurus-plugin-content-docs/current/user-guide/query-data/sql.md index b586e46fbb..435b5a8ce7 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/user-guide/query-data/sql.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/user-guide/query-data/sql.md @@ -257,6 +257,8 @@ http://localhost:4000/v1/sql 有关请求 hints 的更多信息,请参阅 [HTTP hints](/user-guide/protocols/http.md#hints)。 + + ## `CASE` 表达式 你可以使用 `CASE` 表达式在查询中执行条件逻辑。 diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/user-guide/query-data/view.md b/i18n/zh/docusaurus-plugin-content-docs/current/user-guide/query-data/view.md index 5b8825ade4..6833328250 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/user-guide/query-data/view.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/user-guide/query-data/view.md @@ -3,6 +3,8 @@ keywords: [视图, SQL 视图, 创建视图, 更新视图, 删除视图, 显示 description: 介绍了视图的定义、使用示例、更新、显示定义、列出视图和删除视图的方法。 --- + + # 视图 在 SQL 中,视图(View)是基于 SQL 语句的结果集的虚拟表。 diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/user-guide/traces/read-write.md b/i18n/zh/docusaurus-plugin-content-docs/current/user-guide/traces/read-write.md index 8b26e141d2..eea3dccb22 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/user-guide/traces/read-write.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/user-guide/traces/read-write.md @@ -121,6 +121,8 @@ GreptimeDB 的 OTEL 端点支持 Basic 认证。详情请参考 [鉴权](/user-g 通过此接口创建的表,默认为[Append-only 模 式](/user-guide/deployments-administration/performance-tuning/design-table.md#何时使用-append-only-表). + + ## 查询 GreptimeDB 提供了两种 Trace 数据的查询接口,分别是 Jaeger API 兼容接口和 diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-1.0/contributor-guide/datanode/wal.md b/i18n/zh/docusaurus-plugin-content-docs/version-1.0/contributor-guide/datanode/wal.md index 4f6b4cbe5c..529adcdf50 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-1.0/contributor-guide/datanode/wal.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-1.0/contributor-guide/datanode/wal.md @@ -5,6 +5,8 @@ description: 介绍了 GreptimeDB 的预写日志(WAL)机制,包括其命 # 预写日志 + + ## 介绍 我们的存储引擎受到了日志结构合并树(Log-structured Merge Tree,LSMT)的启发。对数据的变更操作直接应用于 MemTable 而不是持久化到磁盘上的数据页,这显著提高了性能,但也带来了持久化相关的问题,特别是在 Datanode 意外崩溃时。与所有类似 LSMT 的存储引擎一样,GreptimeDB 使用预写日志(Write-Ahead Log,WAL)来确保数据被可靠地持久化,并且保证崩溃时的数据完整性。 diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-1.0/contributor-guide/frontend/table-sharding.md b/i18n/zh/docusaurus-plugin-content-docs/version-1.0/contributor-guide/frontend/table-sharding.md index 40f91666a0..63a8ac10a6 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-1.0/contributor-guide/frontend/table-sharding.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-1.0/contributor-guide/frontend/table-sharding.md @@ -7,6 +7,8 @@ description: 介绍 GreptimeDB 中表数据的分片方法,包括分区和 Reg 对于任何分布式数据库来说,数据的分片都是必不可少的。本文将描述 GreptimeDB 中的表数据如何进行分片。 + + ## 分区 有关创建分区表的语法,请参阅用户指南中的[表分片](/user-guide/deployments-administration/manage-data/table-sharding.md)部分。 diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-1.0/contributor-guide/metasrv/selector.md b/i18n/zh/docusaurus-plugin-content-docs/version-1.0/contributor-guide/metasrv/selector.md index 13aac3ad9f..9048e0daa4 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-1.0/contributor-guide/metasrv/selector.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-1.0/contributor-guide/metasrv/selector.md @@ -13,6 +13,8 @@ description: 介绍 Metasrv 中的 Selector,包括其类型和配置方法。 在 `Metasrv` 中存在一个特定的场景。当 `Frontend` 向 `Metasrv` 发送建表请求时,`Metasrv` 会创建一个路由表(表的创建细节不在这里赘述)。在创建路由表时,`Metasrv` 需要选择适当的 `Datanode`s,这时候就需要用到 `Selector`。 + + ## Selector 类型 `Metasrv` 目前提供以下几种类型的 `Selectors`: diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-1.0/db-cloud-shared/migrate/migrate-from-influxdb.md b/i18n/zh/docusaurus-plugin-content-docs/version-1.0/db-cloud-shared/migrate/migrate-from-influxdb.md index 8cd94650fc..b29fba0c46 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-1.0/db-cloud-shared/migrate/migrate-from-influxdb.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-1.0/db-cloud-shared/migrate/migrate-from-influxdb.md @@ -15,6 +15,8 @@ + + ## 写入数据 GreptimeDB 兼容 InfluxDB 的行协议格式,包括 v1 和 v2。 @@ -33,6 +35,8 @@ GreptimeDB 支持 InfluxDB 行协议也意味着 GreptimeDB 与 Telegraf 兼容 + + ### 客户端库 使用 InfluxDB 客户端库写入数据到 GreptimeDB 非常直接且简单。 diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-1.0/reference/command-lines/utilities/metadata-interaction.md b/i18n/zh/docusaurus-plugin-content-docs/version-1.0/reference/command-lines/utilities/metadata-interaction.md index 326aa34c4f..522a13544e 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-1.0/reference/command-lines/utilities/metadata-interaction.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-1.0/reference/command-lines/utilities/metadata-interaction.md @@ -111,6 +111,8 @@ greptime cli meta put table route [OPTIONS] | `--catalog-name ` | 所属 catalog 的名称 | greptime | | `--value-stdin` | 从标准输入读取 JSON 编码的 `TableRouteValue`(必填) | - | + + ## 删除键值对 ### 命令语法 diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-1.0/reference/http-endpoints.md b/i18n/zh/docusaurus-plugin-content-docs/version-1.0/reference/http-endpoints.md index a0dd469525..fac492b6bb 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-1.0/reference/http-endpoints.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-1.0/reference/http-endpoints.md @@ -18,7 +18,7 @@ description: 介绍 GreptimeDB 中各种 HTTP 路径及其用法的完整列表 - **描述**: 提供一个健康检查端点以验证服务器是否正在运行。 - **用法**: 访问此端点以检查服务器的健康状态。 -请参考[检查 GreptimeDB 健康状态文档](/enterprise/deployments-administration/monitoring/check-db-status.md#查看-greptimedb-是否正常运行)获取示例。 +请参考[检查 GreptimeDB 健康状态文档](/user-guide/deployments-administration/monitoring/check-db-status.md#check-if-greptimedb-is-running-normally)获取示例。 ### 状态 @@ -27,7 +27,7 @@ description: 介绍 GreptimeDB 中各种 HTTP 路径及其用法的完整列表 - **描述**: 检索服务器的当前状态。 - **用法**: 使用此端点获取服务器状态信息。 -请参考[检查 GreptimeDB 状态文档](/enterprise/deployments-administration/monitoring/check-db-status.md#查看-greptimedb-的部署状态)获取示例。 +请参考[检查 GreptimeDB 状态文档](/user-guide/deployments-administration/monitoring/check-db-status.md#check-greptimedb-runtime-status)获取示例。 ### 指标 diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-1.0/reference/pipeline/pipeline-config.md b/i18n/zh/docusaurus-plugin-content-docs/version-1.0/reference/pipeline/pipeline-config.md index c98873c3e6..ee6a5f5ea5 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-1.0/reference/pipeline/pipeline-config.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-1.0/reference/pipeline/pipeline-config.md @@ -897,6 +897,8 @@ Transform 由一个或多个配置组成,每个配置包含以下字段: - `on_failure`(可选): 转换失败时的处理方式 - `default`(可选): 默认值 + + ### 版本 2 中的 Transform 在最初的 pipeline 版本中,你需要在 transform 中手动指定所有的字段,来将它们持久化到数据库中。 diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-1.0/reference/sql-tools.md b/i18n/zh/docusaurus-plugin-content-docs/version-1.0/reference/sql-tools.md index bd6436e05e..65bdc2d3b2 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-1.0/reference/sql-tools.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-1.0/reference/sql-tools.md @@ -214,7 +214,7 @@ GreptimeDB 使用 SQL 作为主要查询语言,并支持许多流行的 SQL } ``` - 如果你正在使用 [高层级 API](/user-guide/ingest-data/for-iot/grpc-sdks/go.md#高层级-api) 来插入数据,你可以在模型中同时声明 GORM 和 GreptimeDB Tag。 + 如果你正在使用 [高层级 API](/user-guide/ingest-data/for-iot/grpc-sdks/go.md#high-level-api) 来插入数据,你可以在模型中同时声明 GORM 和 GreptimeDB Tag。 ```go type CpuMetric struct { diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-1.0/reference/sql/alter.md b/i18n/zh/docusaurus-plugin-content-docs/version-1.0/reference/sql/alter.md index fbd578f8c8..7e3005733a 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-1.0/reference/sql/alter.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-1.0/reference/sql/alter.md @@ -179,6 +179,8 @@ ALTER TABLE monitor MODIFY COLUMN load_15 DROP DEFAULT; 删除默认值后,该列将使用 `NULL` 作为默认值。数据库只允许对可为空的列删除默认值。 + + ### 修改表的参数 `ALTER TABLE` 语句也可以用来更改表的选项。 @@ -256,6 +258,8 @@ ALTER TABLE sensor_readings SPLIT PARTITION ( 必须开启共享对象存储和 GC,并确保所有 datanode 都能访问同一对象存储后再执行这些语句。 ::: + + ### 创建列的索引 在列上启用倒排索引: diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-1.0/reference/sql/case.md b/i18n/zh/docusaurus-plugin-content-docs/version-1.0/reference/sql/case.md index 9bcb03ca6c..be7638c604 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-1.0/reference/sql/case.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-1.0/reference/sql/case.md @@ -30,7 +30,7 @@ END ### 在 `SELECT` 中使用 `CASE` 在 `SELECT` 子句中,你可以使用 `CASE` 语句根据条件创建新列。 -请参阅查询数据指南中的[示例](/user-guide/query-data/sql.md#case)。 +请参阅查询数据指南中的[示例](/user-guide/query-data/sql.md#case-expression)。 你还可以将 `CASE` 与 `SUM` 等函数一起使用,以有条件地聚合数据。 例如,你可以计算状态码为 200 和 404 的日志总数: diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-1.0/reference/sql/compatibility.md b/i18n/zh/docusaurus-plugin-content-docs/version-1.0/reference/sql/compatibility.md index 56c899fd36..997bb0015d 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-1.0/reference/sql/compatibility.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-1.0/reference/sql/compatibility.md @@ -13,12 +13,12 @@ GreptimeDB 支持的 SQL 是 ANSI SQL 的子集,并且拥有一些特有的扩 * GreptimeDB 是原生的分布式数据库,因此分布式表的建表语句支持分区规则,也请参考[CREATE](./create.md) 建表语法一节。 2. 插入新数据:与 ANSI SQL 语法一致,但是强制要求提供 `TIME INDEX` 列值(或默认值)。 3. 更新:不支持 `UPDATE` 语法,但是在 `INSERT` 的时候,如果主键和 `TIME INDEX` 对应的列值一样,那么后续插入的行将覆盖以前写入的行,从而变相实现更新。 - * 从 0.8 开始,GreptimeDB 支持 [append 模式](/reference/sql/create.md#创建-Append-Only-表),创建时指定`append_mode = "true"` 选项的表将保留重复的数据行。 - * GreptimeDB 支持 [merge 模式](/reference/sql/create.md#create-an-append-only-table),该模式使用 `merge_mode="last_non_null"` 选项创建表,允许部分更新字段。 + * 从 0.8 开始,GreptimeDB 支持 [append 模式](/reference/sql/create.md#create-an-append-only-table),创建时指定`append_mode = "true"` 选项的表将保留重复的数据行。 + * GreptimeDB 支持 [merge 模式](/reference/sql/create.md#create-a-table-with-merge-mode),该模式使用 `merge_mode="last_non_null"` 选项创建表,允许部分更新字段。 4. 查询:查询语法兼容 ANSI SQL,存在部分功能差异和缺失 * 从 v0.9.0 开始支持[视图](/user-guide/query-data/view.md)。 * TQL 语法扩展:TQL 子命令支持在 SQL 中执行 PromQL,详细请参考 [TQL](./tql.md) 一节。 - * [Range Query](/reference/sql/range.md#range-query) 支持按照指定窗口来查询和聚合时序数据。 + * [Range Query](/reference/sql/range.md) 支持按照指定窗口来查询和聚合时序数据。 5. 删除数据:语法与 ANSI SQL 基本一致。 6. 他项: * 标识符,如表名,列名等,约束与 ANSI SQL 类似,大小写敏感,遇到特殊字符或者大写需要用双引号括起来。 diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-1.0/reference/sql/create.md b/i18n/zh/docusaurus-plugin-content-docs/version-1.0/reference/sql/create.md index c7d9895f4f..6c9b64dd3e 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-1.0/reference/sql/create.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-1.0/reference/sql/create.md @@ -144,6 +144,8 @@ ENGINE = engine WITH([TTL | storage | ...] = expr, ...) GreptimeDB 提供了丰富的索引实现来加速查询,请在[索引](/user-guide/manage-data/data-index.md)章节查看更多信息。 + + ### 表选项 用户可以使用 `WITH` 添加表选项。有效的选项包括以下内容: @@ -177,7 +179,7 @@ CREATE TABLE IF NOT EXISTS temperatures( - [时间范围字符串](/reference/time-durations.md),如 `1hour 12min 5s`。 - `forever`, `NULL`, `0s` (或任何长度为 0 的时间范围,如 `0d`)或空字符串 `''`,表示数据永远不会被删除。 -- `instant`, 注意数据库的 TTL 不能设置为 `instant`。`instant` 表示数据在插入时立即删除,如果你想将输入发送到流任务而不保存它,可以使用 `instant`,请参阅[流管理文档](/user-guide/flow-computation/manage-flow.md#manage-flows)了解更多细节。 +- `instant`, 注意数据库的 TTL 不能设置为 `instant`。`instant` 表示数据在插入时立即删除,如果你想将输入发送到流任务而不保存它,可以使用 `instant`,请参阅[流管理文档](/user-guide/flow-computation/manage-flow.md)了解更多细节。 - 未设置,可以使用 `ALTER TABLE UNSET 'ttl'` 来取消表的 `ttl` 设置,这样表将继承数据库的 `ttl` 策略(如果有的话)。 如果一张表有自己的 TTL 策略,那么它将使用该 TTL 策略。否则,数据库的 TTL 策略将被应用到表上。 @@ -216,6 +218,8 @@ with( ); ``` + + #### 创建 Append-Only 表 创建一个 append-only 表来关闭去重 ```sql @@ -225,6 +229,8 @@ CREATE TABLE IF NOT EXISTS temperatures( ) with('append_mode'='true'); ``` + + #### 创建带有 merge 模式的表 创建一个带有 `last_row` merge 模式的表,这是默认的 merge 模式。 @@ -406,6 +412,8 @@ CREATE TABLE system_metrics ( Query OK, 0 rows affected (0.01 sec) ``` + + #### `INDEX` 列选项 更多关于索引配置、性能对比和使用指南的信息,请参考[索引](/user-guide/manage-data/data-index.md)章节。 @@ -537,7 +545,7 @@ CREATE [OR REPLACE] VIEW [ IF NOT EXISTS ] AS select_statement ``` -用于创建或更新视图,请阅读[视图用户指南](/user-guide/query-data/view.md#视图)。 +用于创建或更新视图,请阅读[视图用户指南](/user-guide/query-data/view.md#view)。 ## 创建 Trigger diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-1.0/reference/sql/data-types.md b/i18n/zh/docusaurus-plugin-content-docs/version-1.0/reference/sql/data-types.md index b54caf9757..bacc96e29c 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-1.0/reference/sql/data-types.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-1.0/reference/sql/data-types.md @@ -79,6 +79,8 @@ SELECT * FROM decimals; 使用 MySQL/PostgreSQL 协议写入时间戳字符串字面量时,值的范围限制为 '0001-01-01 00:00:00' 到 '9999-12-31 23:59:59'。 ::: + + ### Interval 类型详解 `Interval` 类型用于需要跟踪和操作时间间隔的场景。它的编写语法如下: @@ -232,6 +234,8 @@ public=> SELECT INTERVAL '1 year 2 month'; (1 row) ``` + + ## JSON 类型(实验功能) :::warning @@ -265,7 +269,7 @@ SELECT * FROM json_data; ### 查询 JSON 数据 -您可以直接查询 JSON 数据,也可以使用 GreptimeDB 提供的 [JSON 函数](./functions/overview.md#json-functions) 提取特定字段。以下是一个示例: +您可以直接查询 JSON 数据,也可以使用 GreptimeDB 提供的 [JSON 函数](./functions/json.md) 提取特定字段。以下是一个示例: ```sql SELECT json_get_string(my_json, '$.name') as name FROM json_data; diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-1.0/reference/sql/group_by.md b/i18n/zh/docusaurus-plugin-content-docs/version-1.0/reference/sql/group_by.md index c7b5cfc0f1..862c097dc1 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-1.0/reference/sql/group_by.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-1.0/reference/sql/group_by.md @@ -70,4 +70,4 @@ FROM system_metrics GROUP BY dt ``` -请参考 [date_trunc](./functions/overview.md#date_trunc) 获取更多信息。 +请参考 [date_trunc](./functions/df-functions.md#date_trunc) 获取更多信息。 diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-1.0/reference/sql/range.md b/i18n/zh/docusaurus-plugin-content-docs/version-1.0/reference/sql/range.md index 728648c0a1..2105aa435d 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-1.0/reference/sql/range.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-1.0/reference/sql/range.md @@ -39,6 +39,8 @@ INTERVAL := TIME_INTERVAL | ( INTERVAL expr ) - 关键字 `FILL`,可以跟在一个 Range 表达式后,详情请见[FILL Option](#fill-选项) 。 + + ## `FILL` 选项 `FILL` 选项指定了在某个聚合的时间片上没有数据,或者聚合字段的值为空时的数据填充方法。 diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-1.0/user-guide/concepts/features-that-you-concern.md b/i18n/zh/docusaurus-plugin-content-docs/version-1.0/user-guide/concepts/features-that-you-concern.md index 37b8207fd8..0b8d79a095 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-1.0/user-guide/concepts/features-that-you-concern.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-1.0/user-guide/concepts/features-that-you-concern.md @@ -17,7 +17,7 @@ GreptimeDB 将所有可观测数据——metrics、logs、traces——作为带 ## 支持删除数据吗? -支持,参见[删除数据](/user-guide/ingest-data/overview.md#删除数据)。 +支持,参见[删除数据](/user-guide/manage-data/overview.md#删除数据)。 ## 可以按表设置 TTL 或保留策略吗? @@ -79,7 +79,7 @@ GreptimeDB 通过多层手段解决高基数挑战: ## 支持 JSON 数据吗? -支持,参见 [JSON 函数](/reference/sql/functions/overview.md#json-functions)。 +支持,参见 [JSON 函数](/reference/sql/functions/json.md)。 ## 更多问题? diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-1.0/user-guide/deployments-administration/configuration.md b/i18n/zh/docusaurus-plugin-content-docs/version-1.0/user-guide/deployments-administration/configuration.md index 7516878064..8471ecc84c 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-1.0/user-guide/deployments-administration/configuration.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-1.0/user-guide/deployments-administration/configuration.md @@ -29,6 +29,8 @@ greptime standalone start --http-addr 127.0.0.1:4000 有关 Greptime 命令行支持的所有选项,请参阅 [GreptimeDB 命令行界面](/reference/command-lines/overview.md)。 + + ### 配置文件选项 你可以在 TOML 文件中指定配置项。 @@ -130,6 +132,8 @@ write_bytes_exhausted_policy = "wait" | `max_in_flight_write_bytes` | 字符串 | `"0"` | 所有并发写入请求体和消息(HTTP、gRPC、Flight)的最大总内存。设置为 `"0"` 表示禁用限制(无限制)。支持的单位:`B`、`KB`、`MB`、`GB` 等。示例:`"1GB"` 将并发写入总量限制为 1GB。 | | `write_bytes_exhausted_policy` | 字符串 | `"wait"` | 写入字节配额耗尽时的策略。可选值:`"wait"`(默认,等待最多 10 秒)、`"wait()"`(自定义超时时间,例如 `"wait(30s)"`)、`"fail"`(立即拒绝请求)。 | + + ### 协议选项 协议选项适用于 `frontend` 和 `standalone` 子命令,它指定了协议服务器地址和其他协议相关的选项。 @@ -240,6 +244,8 @@ enable = true parallelism = 0 ``` + + ### 存储选项 `存储`选项在 `datanode` 和 `standalone` 模式下有效,它指定了数据库数据目录和其他存储相关的选项。 @@ -391,6 +397,8 @@ default_ratio = 1.0 如何使用分布式追踪,请参考 [Tracing](/user-guide/deployments-administration/monitoring/tracing.md#教程使用-jaeger-追踪-greptimedb-调用链路) + + ### Region 引擎选项 datanode 和 standalone 在 `[region_engine]` 部分可以配置不同存储引擎的对应参数。目前可以配置 `mito` 和 `metric` 存储引擎的选项。 @@ -559,6 +567,8 @@ default_timezone = "UTC" `default_timezone` 的值可以是任何时区名称,例如 `Europe/Berlin` 或 `Asia/Shanghai`。 有关客户端时区如何影响数据的写入和查询,请参阅[时区](/user-guide/timezone.md#时区对-sql-语句的影响)文档。 + + ### 仅限于 Metasrv 的配置 ```toml diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-1.0/user-guide/deployments-administration/deploy-on-kubernetes/common-helm-chart-configurations.md b/i18n/zh/docusaurus-plugin-content-docs/version-1.0/user-guide/deployments-administration/deploy-on-kubernetes/common-helm-chart-configurations.md index d200912d22..8d82b5ab57 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-1.0/user-guide/deployments-administration/deploy-on-kubernetes/common-helm-chart-configurations.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-1.0/user-guide/deployments-administration/deploy-on-kubernetes/common-helm-chart-configurations.md @@ -480,6 +480,8 @@ debugPod: cpu: 200m ``` + + ### 配置 Metasrv 后端存储 #### 使用 MySQL 和 PostgreSQL 作为后端存储 @@ -585,6 +587,8 @@ meta: - `etcd.endpoints`: etcd 服务地址。 - `etcd.storeKeyPrefix`: etcd 存储 key 前缀。所有 key 都会被存储在这个前缀下。如果你希望使用一个 etcd 集群为多个 GreptimeDB 集群提供服务,你可以为每个 GreptimeDB 集群配置不同的存储 key 前缀。这仅用于测试和调试目的。 + + ### 启用 Region Failover 你可以通过 `meta.enableRegionFailover` 字段启用 Region Failover。在启用 Region Failover 之前,请确保你的部署满足 [Region Failover](/user-guide/deployments-administration/manage-data/region-failover.md) 文档中的先决条件。如果你的配置不满足条件,**Operator 将无法部署集群组件**。 diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-1.0/user-guide/deployments-administration/deploy-on-kubernetes/deploy-greptimedb-cluster.md b/i18n/zh/docusaurus-plugin-content-docs/version-1.0/user-guide/deployments-administration/deploy-on-kubernetes/deploy-greptimedb-cluster.md index 843c93166b..4547556995 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-1.0/user-guide/deployments-administration/deploy-on-kubernetes/deploy-greptimedb-cluster.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-1.0/user-guide/deployments-administration/deploy-on-kubernetes/deploy-greptimedb-cluster.md @@ -227,6 +227,8 @@ http://etcd-2.etcd-headless.etcd-cluster.svc.cluster.local:2379 is healthy: succ ``` + + ## 配置 `values.yaml` `values.yaml` 文件设置了 GreptimeDB 的一些参数和配置,是定义 helm chart 的关键。 @@ -393,6 +395,8 @@ kubectl -n default port-forward --address 0.0.0.0 svc/mycluster-frontend 4000:40 如果你想使用其他工具如 `mysql` 或 `psql` 来连接 GreptimeDB 集群,你可以参考 [快速入门](/getting-started/quick-start.md)。 + + ## 删除集群 :::danger diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-1.0/user-guide/deployments-administration/manage-data/basic-table-operations.md b/i18n/zh/docusaurus-plugin-content-docs/version-1.0/user-guide/deployments-administration/manage-data/basic-table-operations.md index f9a9a4ee31..b6337ed98c 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-1.0/user-guide/deployments-administration/manage-data/basic-table-operations.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-1.0/user-guide/deployments-administration/manage-data/basic-table-operations.md @@ -68,6 +68,8 @@ SHOW DATABASES LIKE 'p%'; USE test; ``` + + ## 创建表 :::tip NOTE @@ -222,7 +224,7 @@ SHOW INDEXES FROM monitor; +---------+------------+------------+--------------+-------------+-----------+-------------+----------+--------+------+-------------------------+---------+---------------+---------+------------+ ``` -有关 `SHOW` 语句的更多信息,请阅读 [SHOW 参考](/reference/sql/show.md#show)。 +有关 `SHOW` 语句的更多信息,请阅读 [SHOW 参考](/reference/sql/show.md)。 ## 列出现有的表 diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-1.0/user-guide/deployments-administration/manage-data/table-sharding.md b/i18n/zh/docusaurus-plugin-content-docs/version-1.0/user-guide/deployments-administration/manage-data/table-sharding.md index 39b2c6e372..f528e162a4 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-1.0/user-guide/deployments-administration/manage-data/table-sharding.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-1.0/user-guide/deployments-administration/manage-data/table-sharding.md @@ -39,6 +39,8 @@ GreptimeDB 中的一个 region 具有相对固定的吞吐量, 有关分区和 region 之间关系的更多信息,请参阅贡献者指南中的[表分片](/contributor-guide/frontend/table-sharding.md)部分。 + + ## 分区 在 GreptimeDB 中,表可以按列值范围进行水平分区。 diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-1.0/user-guide/deployments-administration/monitoring/check-db-status.md b/i18n/zh/docusaurus-plugin-content-docs/version-1.0/user-guide/deployments-administration/monitoring/check-db-status.md index c0a8e300a9..72305acc12 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-1.0/user-guide/deployments-administration/monitoring/check-db-status.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-1.0/user-guide/deployments-administration/monitoring/check-db-status.md @@ -8,6 +8,8 @@ description: 通过 HTTP 接口检查 GreptimeDB 的健康状态、部署状态 GreptimeDB 包含了一系列的 HTTP 接口可供查询 GreptimeDB 的运行情况。 以下发起的 HTTP 请求均假定 GreptimeDB 运行在节点 `127.0.0.1` 上,其 HTTP 服务监听默认的 `4000` 端口。 + + ## 查看 GreptimeDB 是否正常运行: 你可以使用 `/health` 接口检查 GreptimeDB 是否正常运行。 @@ -34,6 +36,8 @@ date: Sun, 26 Apr 2026 13:46:41 GMT 有关健康检查接口的更多信息,请参考[健康检查接口](/reference/http-endpoints.md#健康检查)。 + + ## 查看 GreptimeDB 的部署状态 你可以使用 `/status` 接口检查 GreptimeDB 的部署状态。 diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-1.0/user-guide/deployments-administration/monitoring/cluster-monitoring-deployment.md b/i18n/zh/docusaurus-plugin-content-docs/version-1.0/user-guide/deployments-administration/monitoring/cluster-monitoring-deployment.md index 51b601a51e..eb9434b406 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-1.0/user-guide/deployments-administration/monitoring/cluster-monitoring-deployment.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-1.0/user-guide/deployments-administration/monitoring/cluster-monitoring-deployment.md @@ -102,7 +102,7 @@ mycluster-monitor-standalone-0 1/1 Running 0 6m35s kubectl -n default port-forward svc/mycluster-grafana 18080:80 ``` -请参考[访问 Grafana 仪表盘](#访问-grafana仪表盘)章节来查看相应的数据面板。 +请参考[访问 Grafana 仪表盘](#访问-grafana-仪表盘)章节来查看相应的数据面板。 ## 配置监控数据的收集 diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-1.0/user-guide/deployments-administration/performance-tuning/design-table.md b/i18n/zh/docusaurus-plugin-content-docs/version-1.0/user-guide/deployments-administration/performance-tuning/design-table.md index 427cbcbca5..8a5b0264e3 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-1.0/user-guide/deployments-administration/performance-tuning/design-table.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-1.0/user-guide/deployments-administration/performance-tuning/design-table.md @@ -371,10 +371,10 @@ CREATE TABLE IF NOT EXISTS `raw_logs` ( ``` `message` 字段使用 `FULLTEXT INDEX` 选项进行全文索引。 -更多信息请参见[fulltext 列选项](/reference/sql/create.md#fulltext-列选项)。 +更多信息请参见[fulltext 列选项](/reference/sql/create.md#index-column-option)。 存储和查询结构化日志通常比带有全文索引的非结构化日志性能更好。 -建议[使用 Pipeline](/user-guide/logs/quick-start.md#创建-pipeline) 将日志转换为结构化日志。 +建议[使用 Pipeline](/user-guide/logs/use-custom-pipelines.md#create-a-pipeline) 将日志转换为结构化日志。 ### 何时使用索引 diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-1.0/user-guide/flow-computation/continuous-aggregation.md b/i18n/zh/docusaurus-plugin-content-docs/version-1.0/user-guide/flow-computation/continuous-aggregation.md index 63182a60a2..be98ddcde5 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-1.0/user-guide/flow-computation/continuous-aggregation.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-1.0/user-guide/flow-computation/continuous-aggregation.md @@ -398,6 +398,8 @@ SELECT * FROM ngx_distribution; 6 rows in set (0.00 sec) ``` + + ## 将 TQL 与 Flow 结合使用进行高级时序分析 :::warning 实验性特性 diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-1.0/user-guide/flow-computation/manage-flow.md b/i18n/zh/docusaurus-plugin-content-docs/version-1.0/user-guide/flow-computation/manage-flow.md index 07636520a9..e2f43b3d40 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-1.0/user-guide/flow-computation/manage-flow.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-1.0/user-guide/flow-computation/manage-flow.md @@ -167,6 +167,8 @@ SELECT AGGR_FUNCTION(column1, column2,..) [, TIME_WINDOW_FUNCTION() as time_wind 有关如何在实时分析、监控和仪表板中使用持续聚合的更多示例,请参阅[持续聚合](./continuous-aggregation.md)。 + + ### 定义时间窗口 时间窗口是持续聚合查询的重要属性。 diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-1.0/user-guide/ingest-data/for-iot/grpc-sdks/go.md b/i18n/zh/docusaurus-plugin-content-docs/version-1.0/user-guide/ingest-data/for-iot/grpc-sdks/go.md index 5ee1b429dd..99246c8d1f 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-1.0/user-guide/ingest-data/for-iot/grpc-sdks/go.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-1.0/user-guide/ingest-data/for-iot/grpc-sdks/go.md @@ -191,6 +191,8 @@ if err != nil { affected, err := cli.CloseStream(ctx) ``` + + ## 高级 API SDK 的高级 API 使用 ORM 风格的对象写入数据, @@ -247,7 +249,7 @@ affected, err := cli.CloseStream(ctx) ## 插入 JSON 类型的数据 -GreptimeDB 支持使用 [JSON 类型数据](/reference/sql/data-types.md#json-类型) 存储复杂的数据结构。 +GreptimeDB 支持使用 [JSON 类型数据](/reference/sql/data-types.md#json-type-experimental) 存储复杂的数据结构。 使用此 ingester 库,你可以通过字符串值插入 JSON 数据。 假如你有一个名为 `sensor_readings` 的表,并希望添加一个名为 `attributes` 的 JSON 列, 请参考以下代码片段。 diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-1.0/user-guide/ingest-data/for-iot/grpc-sdks/java.md b/i18n/zh/docusaurus-plugin-content-docs/version-1.0/user-guide/ingest-data/for-iot/grpc-sdks/java.md index 069249bfd7..e9210acb4c 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-1.0/user-guide/ingest-data/for-iot/grpc-sdks/java.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-1.0/user-guide/ingest-data/for-iot/grpc-sdks/java.md @@ -164,7 +164,7 @@ table.complete(); CompletableFuture> future = client.write(table); ``` -GreptimeDB 支持使用 [JSON 类型数据](/reference/sql/data-types.md#json-类型) 存储复杂的数据结构。你可以在表结构中定义 JSON 列,并使用 Map 对象插入数据: +GreptimeDB 支持使用 [JSON 类型数据](/reference/sql/data-types.md#json-type-experimental) 存储复杂的数据结构。你可以在表结构中定义 JSON 列,并使用 Map 对象插入数据: ```java // 为 sensor_readings 构建表结构 diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-1.0/user-guide/ingest-data/for-iot/sql.md b/i18n/zh/docusaurus-plugin-content-docs/version-1.0/user-guide/ingest-data/for-iot/sql.md index 3023b6632b..42715296ef 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-1.0/user-guide/ingest-data/for-iot/sql.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-1.0/user-guide/ingest-data/for-iot/sql.md @@ -73,6 +73,8 @@ VALUES 通过上面的语句,我们成功的向 `monitor` 表中插入了六条数据。请参考 [`INSERT`](/reference/sql/insert.md) 获得更多写入数据的相关信息。 + + ## 时区 SQL 客户端中指定的时区将影响没有时区信息的字符串格式的时间戳。 diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-1.0/user-guide/ingest-data/for-observability/kafka.md b/i18n/zh/docusaurus-plugin-content-docs/version-1.0/user-guide/ingest-data/for-observability/kafka.md index 0940c78491..bf703ee07e 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-1.0/user-guide/ingest-data/for-observability/kafka.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-1.0/user-guide/ingest-data/for-observability/kafka.md @@ -47,6 +47,8 @@ tls = {} 有关 InfluxDB 行协议指标如何映射到 GreptimeDB 数据的详细信息,请参阅 InfluxDB 行协议文档中的[数据模型](/user-guide/ingest-data/for-iot/influxdb-line-protocol.md#数据模型)部分。 + + ## 日志 开发人员通常处理两种类型的日志:JSON 日志和纯文本日志。 @@ -70,12 +72,12 @@ tls = {} GreptimeDB 将这些日志转换为具有多个列的结构化数据,并自动创建必要的表。 Pipeline 在写入到 GreptimeDB 之前将日志处理为结构化数据。 -不同的日志格式需要不同的 [Pipeline](/user-guide/logs/quick-start.md#write-logs-by-pipeline) 来解析,详情请继续阅读下面的内容。 +不同的日志格式需要不同的 [Pipeline](/user-guide/logs/use-custom-pipelines.md) 来解析,详情请继续阅读下面的内容。 ### JSON 格式的日志 对于 JSON 格式的日志(例如 `{"timestamp": "2024-12-23T10:00:00Z", "level": "INFO", "message": "Service started"}`), -你可以使用内置的 [`greptime_identity`](/user-guide/logs/manage-pipelines.md#greptime_identity) pipeline 直接写入日志。 +你可以使用内置的 [`greptime_identity`](/reference/pipeline/built-in-pipelines.md#greptime_identity) pipeline 直接写入日志。 此 pipeline 根据 JSON 日志消息中的字段自动创建列。 你只需要配置 Vector 的 `transforms` 设置以解析 JSON 消息,并使用 `greptime_identity` pipeline,如以下示例所示: diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-1.0/user-guide/ingest-data/for-observability/loki.md b/i18n/zh/docusaurus-plugin-content-docs/version-1.0/user-guide/ingest-data/for-observability/loki.md index ceaa7c1c23..4df35080dd 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-1.0/user-guide/ingest-data/for-observability/loki.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-1.0/user-guide/ingest-data/for-observability/loki.md @@ -132,6 +132,8 @@ WITH( 1 row in set (0.00 sec) ``` + + ## 在 Loki Push API 中使用 pipeline :::warning 实验性特性 @@ -222,7 +224,7 @@ loki.write "greptime_loki" { 1. 首先,启动你的 GreptimeDB 实例。参见[这里](/getting-started/installation/overview.md)快速启动。 -2. [上传](/user-guide/logs/manage-pipelines.md#create-a-pipeline) pipeline 配置到数据库: +2. [上传](/user-guide/logs/manage-pipelines.md#upload-a-pipeline) pipeline 配置到数据库: ```bash curl -X "POST" "http://localhost:4000/v1/pipelines/pp" -F "file=@pipeline.yaml" diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-1.0/user-guide/ingest-data/for-observability/prometheus.md b/i18n/zh/docusaurus-plugin-content-docs/version-1.0/user-guide/ingest-data/for-observability/prometheus.md index bb47880dff..e0f7517373 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-1.0/user-guide/ingest-data/for-observability/prometheus.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-1.0/user-guide/ingest-data/for-observability/prometheus.md @@ -7,6 +7,8 @@ description: 介绍如何将 GreptimeDB 作为 Prometheus 的长期存储解决 GreptimeDB 可以作为 Prometheus 的长期存储解决方案,提供无缝集成体验。 + + ## 配置 Remote Write ### Prometheus 配置文件 @@ -42,6 +44,8 @@ remote_read: 如果你使用 Vector ,请在 Vector 配置文件(`vector.toml`)中配置 Remote Write。有关更多信息,请参阅 [Vector 文档](vector.md#使用-prometheus-remote-write-协议). + + ## 数据模型 在 GreptimeDB 的[数据模型](/user-guide/concepts/data-model.md)中,数据被组织成具有 tag、time index 和 field 的表。 @@ -151,6 +155,8 @@ WHERE greptime_timestamp > "2024-08-07 03:27:26.964000" AND job = "job1"; ``` + + ### 在 GreptimeDB 集群上使用 metric engine 在使用 Prometheus remote write 写入 GreptimeDB 集群时,用户可能注意到集群中只有 diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-1.0/user-guide/ingest-data/for-observability/vector.md b/i18n/zh/docusaurus-plugin-content-docs/version-1.0/user-guide/ingest-data/for-observability/vector.md index 59f9449454..768e5c2e97 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-1.0/user-guide/ingest-data/for-observability/vector.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-1.0/user-guide/ingest-data/for-observability/vector.md @@ -47,7 +47,7 @@ new_naming = true ``` Vector 使用 gRPC 与 GreptimeDB 进行通信,因此 Vector sink 的默认端口是 `4001`。 -如果你在使用 [自定义配置](/user-guide/deployments-administration/configuration.md#configuration-file) 启动 GreptimeDB 时更改了默认的 gRPC 端口,请使用你自己的端口。 +如果你在使用 [自定义配置](/user-guide/deployments-administration/configuration.md#configuration-file-options) 启动 GreptimeDB 时更改了默认的 gRPC 端口,请使用你自己的端口。 如有更多需求请前往 [Vector GreptimeDB Configuration](https://vector.dev/docs/reference/configuration/sinks/greptimedb_metrics/) 查看更多配置项。 @@ -124,6 +124,8 @@ GreptimeDB 支持多种日志数据写入方式,包括: 我们强烈建议所有的用户使用 `greptimedb_logs` sink 来写入日志数据,因为它是为 GreptimeDB 优化的,能够更好地支持 GreptimeDB 的特性。 并且推荐开启各种协议的压缩功能,以提高数据传输效率。 + + ### 使用 `greptimedb_logs` sink (推荐) ```toml diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-1.0/user-guide/logs/manage-pipelines.md b/i18n/zh/docusaurus-plugin-content-docs/version-1.0/user-guide/logs/manage-pipelines.md index 48a78bc591..e96108d905 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-1.0/user-guide/logs/manage-pipelines.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-1.0/user-guide/logs/manage-pipelines.md @@ -15,6 +15,8 @@ description: 介绍如何在 GreptimeDB 中管理 Pipeline,包括创建、删 在使用 HTTP API 进行 Pipeline 管理时,你需要提供有效的鉴权信息。 请参考[鉴权](/user-guide/protocols/http.md#鉴权)文档了解详细信息。 + + ## 上传 Pipeline GreptimeDB 提供了专用的 HTTP 接口用于创建 Pipeline。 @@ -204,7 +206,7 @@ Readable timestamp (UTC): 2024-06-27 12:02:34.257312110Z ## 问题调试 -首先,请参考 [快速入门示例](/user-guide/logs/quick-start.md#使用-pipeline-写入日志)来查看 Pipeline 正确的执行情况。 +首先,请参考 [快速入门示例](/user-guide/logs/quick-start.md#直接通过-http-写入日志)来查看 Pipeline 正确的执行情况。 ### 调试创建 Pipeline diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-1.0/user-guide/logs/quick-start.md b/i18n/zh/docusaurus-plugin-content-docs/version-1.0/user-guide/logs/quick-start.md index a72b6464d0..974ce4abfd 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-1.0/user-guide/logs/quick-start.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-1.0/user-guide/logs/quick-start.md @@ -18,6 +18,8 @@ GreptimeDB 提供了强大的基于 pipeline 的日志写入系统。 - 灵活支持变化的日志结构 - 需要最少的配置即可开始使用 + + ## 直接通过 HTTP 写入日志 GreptimeDB 日志写入最简单的方法是通过使用 `greptime_identity` pipeline 发送 HTTP 请求。 diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-1.0/user-guide/logs/use-custom-pipelines.md b/i18n/zh/docusaurus-plugin-content-docs/version-1.0/user-guide/logs/use-custom-pipelines.md index b0f258f10c..1dd0b6961c 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-1.0/user-guide/logs/use-custom-pipelines.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-1.0/user-guide/logs/use-custom-pipelines.md @@ -28,6 +28,8 @@ GreptimeDB 能够将日志自动解析和转换为多列的结构化数据, 127.0.0.1 - - [25/May/2024:20:16:37 +0000] "GET /index.html HTTP/1.1" 200 612 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36" ``` + + ## 创建自定义 Pipeline GreptimeDB 提供 HTTP 接口用于创建 pipeline。 @@ -103,6 +105,8 @@ transform: 有关 pipeline 配置选项的详细信息, 请参考 [Pipeline 配置](/reference/pipeline/pipeline-config.md) 文档。 + + ## 上传 Pipeline 执行以下命令上传 pipeline 配置: @@ -124,6 +128,8 @@ curl -X "POST" \ 所有 pipeline 都存储在 `greptime_private.pipelines` 表中。 参考[查询 Pipeline](manage-pipelines.md#查询-pipeline) 来查看 pipeline 数据。 + + ## 使用 Pipeline 写入日志 以下示例使用 `nginx_pipeline` pipeline 将日志写入 `custom_pipeline_logs` 表来格式化和转换日志消息: diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-1.0/user-guide/manage-data/data-index.md b/i18n/zh/docusaurus-plugin-content-docs/version-1.0/user-guide/manage-data/data-index.md index d04ce525ee..9475c00592 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-1.0/user-guide/manage-data/data-index.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-1.0/user-guide/manage-data/data-index.md @@ -41,6 +41,8 @@ CREATE TABLE monitoring_data ( 需要注意的是,当列的基数非常大时,倒排索引可能会带来较高的维护成本,导致内存占用增加和索引体积膨胀。这种情况下,建议考虑使用跳数索引作为替代方案。 + + ### 跳数索引 跳数索引是专为列式存储系统(如 GreptimeDB)优化设计的索引类型。它通过维护数据块内值域范围的元数据,使查询引擎能够在进行范围查询时快速跳过不相关的数据块。与其他索引相比,跳数索引的存储开销相对较小。 diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-1.0/user-guide/migrate-to-greptimedb/migrate-from-clickhouse.md b/i18n/zh/docusaurus-plugin-content-docs/version-1.0/user-guide/migrate-to-greptimedb/migrate-from-clickhouse.md index c29e7b05af..bdfc05d9af 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-1.0/user-guide/migrate-to-greptimedb/migrate-from-clickhouse.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-1.0/user-guide/migrate-to-greptimedb/migrate-from-clickhouse.md @@ -169,7 +169,7 @@ CREATE TABLE traces ( - `service` 与 `operation` 作为主键,便于链路调度和按服务聚合。 - `trace_id`、`span_id`、`parent_span_id` 用跳数索引,不作为主键。 -- 高基数字段仅作普通字段,便于写入效率;`tags` 推荐用字符串或 json,复杂属性可结合 [ETL Pipeline](/user-guide/logs/quick-start.md#使用-pipeline-写入日志) 展开。 +- 高基数字段仅作普通字段,便于写入效率;`tags` 推荐用字符串或 json,复杂属性可结合 [ETL Pipeline](/user-guide/logs/use-custom-pipelines.md) 展开。 - 若业务量极大可考虑多表分区(如多服务场景区分)。 diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-1.0/user-guide/protocols/http.md b/i18n/zh/docusaurus-plugin-content-docs/version-1.0/user-guide/protocols/http.md index 0379c3c3eb..3ec8bf5235 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-1.0/user-guide/protocols/http.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-1.0/user-guide/protocols/http.md @@ -18,6 +18,8 @@ API Base URL 是 `http(s)://{{host}}:{{port}}/`。 ## 通用 Headers + + ### 鉴权 假设你已经正确设置了数据库[鉴权](/user-guide/deployments-administration/authentication/overview.md), @@ -102,6 +104,8 @@ http://localhost:4000/v1/sql 请参考 [Admin APIs 接口](/reference/http-endpoints.md#管理-api)文档以获取更多信息。 + + ## POST SQL 语句 要通过 HTTP API 向 GreptimeDB 服务器提交 SQL 语句,请使用以下格式: @@ -144,6 +148,8 @@ http://{{API-host}}/v1/sql - `sql`: SQL 语句。必填。 + + ### 响应 响应是一个 JSON 对象,包含以下字段: diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-1.0/user-guide/query-data/promql.md b/i18n/zh/docusaurus-plugin-content-docs/version-1.0/user-guide/query-data/promql.md index aa4ae287fa..8a6b06f98d 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-1.0/user-guide/query-data/promql.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-1.0/user-guide/query-data/promql.md @@ -7,6 +7,8 @@ description: 介绍 GreptimeDB 对 Prometheus 查询语言(PromQL)的支持 GreptimeDB 可以作为 Grafana 中 Prometheus 的替代品,因为 GreptimeDB 支持 PromQL(Prometheus Query Language)。GreptimeDB 在 Rust 中重新实现了 PromQL,并通过接口将能力开放,包括 Prometheus 的 HTTP API、GreptimeDB 的 HTTP API 和 SQL 接口。 + + ## Prometheus 的 HTTP API @@ -286,4 +288,4 @@ PromQL 的时间戳精度受制于查询语法的限制,最高只支持毫秒 - 不支持: -无 \ No newline at end of file +无 diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-1.0/user-guide/query-data/sql.md b/i18n/zh/docusaurus-plugin-content-docs/version-1.0/user-guide/query-data/sql.md index 927a5837dd..8e2eacdc8d 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-1.0/user-guide/query-data/sql.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-1.0/user-guide/query-data/sql.md @@ -228,6 +228,8 @@ SELECT * FROM monitor ORDER BY ts ASC; SELECT * FROM monitor ORDER BY ts DESC; ``` + + ## `CASE` 表达式 你可以使用 `CASE` 表达式在查询中执行条件逻辑。 diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-1.0/user-guide/query-data/view.md b/i18n/zh/docusaurus-plugin-content-docs/version-1.0/user-guide/query-data/view.md index 5b8825ade4..6833328250 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-1.0/user-guide/query-data/view.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-1.0/user-guide/query-data/view.md @@ -3,6 +3,8 @@ keywords: [视图, SQL 视图, 创建视图, 更新视图, 删除视图, 显示 description: 介绍了视图的定义、使用示例、更新、显示定义、列出视图和删除视图的方法。 --- + + # 视图 在 SQL 中,视图(View)是基于 SQL 语句的结果集的虚拟表。 diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-1.0/user-guide/traces/read-write.md b/i18n/zh/docusaurus-plugin-content-docs/version-1.0/user-guide/traces/read-write.md index 88cba09c15..6055152402 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-1.0/user-guide/traces/read-write.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-1.0/user-guide/traces/read-write.md @@ -121,6 +121,8 @@ GreptimeDB 的 OTEL 端点支持 Basic 认证。详情请参考 [鉴权](/user-g 通过此接口创建的表,默认为[Append-only 模 式](/user-guide/deployments-administration/performance-tuning/design-table.md#何时使用-append-only-表). + + ## 查询 GreptimeDB 提供了两种 Trace 数据的查询接口,分别是 Jaeger API 兼容接口和 diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-1.1/contributor-guide/datanode/wal.md b/i18n/zh/docusaurus-plugin-content-docs/version-1.1/contributor-guide/datanode/wal.md index 4f6b4cbe5c..529adcdf50 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-1.1/contributor-guide/datanode/wal.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-1.1/contributor-guide/datanode/wal.md @@ -5,6 +5,8 @@ description: 介绍了 GreptimeDB 的预写日志(WAL)机制,包括其命 # 预写日志 + + ## 介绍 我们的存储引擎受到了日志结构合并树(Log-structured Merge Tree,LSMT)的启发。对数据的变更操作直接应用于 MemTable 而不是持久化到磁盘上的数据页,这显著提高了性能,但也带来了持久化相关的问题,特别是在 Datanode 意外崩溃时。与所有类似 LSMT 的存储引擎一样,GreptimeDB 使用预写日志(Write-Ahead Log,WAL)来确保数据被可靠地持久化,并且保证崩溃时的数据完整性。 diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-1.1/contributor-guide/frontend/table-sharding.md b/i18n/zh/docusaurus-plugin-content-docs/version-1.1/contributor-guide/frontend/table-sharding.md index 40f91666a0..63a8ac10a6 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-1.1/contributor-guide/frontend/table-sharding.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-1.1/contributor-guide/frontend/table-sharding.md @@ -7,6 +7,8 @@ description: 介绍 GreptimeDB 中表数据的分片方法,包括分区和 Reg 对于任何分布式数据库来说,数据的分片都是必不可少的。本文将描述 GreptimeDB 中的表数据如何进行分片。 + + ## 分区 有关创建分区表的语法,请参阅用户指南中的[表分片](/user-guide/deployments-administration/manage-data/table-sharding.md)部分。 diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-1.1/contributor-guide/metasrv/selector.md b/i18n/zh/docusaurus-plugin-content-docs/version-1.1/contributor-guide/metasrv/selector.md index 13aac3ad9f..9048e0daa4 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-1.1/contributor-guide/metasrv/selector.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-1.1/contributor-guide/metasrv/selector.md @@ -13,6 +13,8 @@ description: 介绍 Metasrv 中的 Selector,包括其类型和配置方法。 在 `Metasrv` 中存在一个特定的场景。当 `Frontend` 向 `Metasrv` 发送建表请求时,`Metasrv` 会创建一个路由表(表的创建细节不在这里赘述)。在创建路由表时,`Metasrv` 需要选择适当的 `Datanode`s,这时候就需要用到 `Selector`。 + + ## Selector 类型 `Metasrv` 目前提供以下几种类型的 `Selectors`: diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-1.1/db-cloud-shared/migrate/migrate-from-influxdb.md b/i18n/zh/docusaurus-plugin-content-docs/version-1.1/db-cloud-shared/migrate/migrate-from-influxdb.md index 86b00adaf8..a579baecdb 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-1.1/db-cloud-shared/migrate/migrate-from-influxdb.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-1.1/db-cloud-shared/migrate/migrate-from-influxdb.md @@ -34,6 +34,8 @@ SHOW CREATE TABLE measurement_name; + + ## 写入数据 GreptimeDB 兼容 InfluxDB 的行协议格式,包括 v1 和 v2。 @@ -54,6 +56,8 @@ GreptimeDB 支持 InfluxDB 行协议也意味着 GreptimeDB 与 Telegraf 兼容 + + ### 客户端库 使用 InfluxDB 客户端库写入数据到 GreptimeDB 非常直接且简单。 diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-1.1/reference/command-lines/utilities/metadata-interaction.md b/i18n/zh/docusaurus-plugin-content-docs/version-1.1/reference/command-lines/utilities/metadata-interaction.md index 326aa34c4f..522a13544e 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-1.1/reference/command-lines/utilities/metadata-interaction.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-1.1/reference/command-lines/utilities/metadata-interaction.md @@ -111,6 +111,8 @@ greptime cli meta put table route [OPTIONS] | `--catalog-name ` | 所属 catalog 的名称 | greptime | | `--value-stdin` | 从标准输入读取 JSON 编码的 `TableRouteValue`(必填) | - | + + ## 删除键值对 ### 命令语法 diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-1.1/reference/http-endpoints.md b/i18n/zh/docusaurus-plugin-content-docs/version-1.1/reference/http-endpoints.md index 846c5482f6..af70cc67c6 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-1.1/reference/http-endpoints.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-1.1/reference/http-endpoints.md @@ -18,7 +18,7 @@ description: 介绍 GreptimeDB 中各种 HTTP 路径及其用法的完整列表 - **描述**: 提供一个健康检查端点以验证服务器是否正在运行。 - **用法**: 访问此端点以检查服务器的健康状态。 -请参考[检查 GreptimeDB 健康状态文档](/enterprise/deployments-administration/monitoring/check-db-status.md#查看-greptimedb-是否正常运行)获取示例。 +请参考[检查 GreptimeDB 健康状态文档](/user-guide/deployments-administration/monitoring/check-db-status.md#check-if-greptimedb-is-running-normally)获取示例。 ### 状态 @@ -27,7 +27,7 @@ description: 介绍 GreptimeDB 中各种 HTTP 路径及其用法的完整列表 - **描述**: 检索服务器的当前状态。 - **用法**: 使用此端点获取服务器状态信息。 -请参考[检查 GreptimeDB 状态文档](/enterprise/deployments-administration/monitoring/check-db-status.md#查看-greptimedb-的部署状态)获取示例。 +请参考[检查 GreptimeDB 状态文档](/user-guide/deployments-administration/monitoring/check-db-status.md#check-greptimedb-runtime-status)获取示例。 ### 指标 diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-1.1/reference/pipeline/pipeline-config.md b/i18n/zh/docusaurus-plugin-content-docs/version-1.1/reference/pipeline/pipeline-config.md index edee728ec0..fb1c257c87 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-1.1/reference/pipeline/pipeline-config.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-1.1/reference/pipeline/pipeline-config.md @@ -969,6 +969,8 @@ Transform 由一个或多个配置组成,每个配置包含以下字段: - `on_failure`(可选): 转换失败时的处理方式 - `default`(可选): 默认值 + + ### 版本 2 中的 Transform 在最初的 pipeline 版本中,你需要在 transform 中手动指定所有的字段,来将它们持久化到数据库中。 diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-1.1/reference/sql-tools.md b/i18n/zh/docusaurus-plugin-content-docs/version-1.1/reference/sql-tools.md index bd6436e05e..65bdc2d3b2 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-1.1/reference/sql-tools.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-1.1/reference/sql-tools.md @@ -214,7 +214,7 @@ GreptimeDB 使用 SQL 作为主要查询语言,并支持许多流行的 SQL } ``` - 如果你正在使用 [高层级 API](/user-guide/ingest-data/for-iot/grpc-sdks/go.md#高层级-api) 来插入数据,你可以在模型中同时声明 GORM 和 GreptimeDB Tag。 + 如果你正在使用 [高层级 API](/user-guide/ingest-data/for-iot/grpc-sdks/go.md#high-level-api) 来插入数据,你可以在模型中同时声明 GORM 和 GreptimeDB Tag。 ```go type CpuMetric struct { diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-1.1/reference/sql/alter.md b/i18n/zh/docusaurus-plugin-content-docs/version-1.1/reference/sql/alter.md index 203ff9e8f4..1a7465efdf 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-1.1/reference/sql/alter.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-1.1/reference/sql/alter.md @@ -181,6 +181,8 @@ ALTER TABLE monitor MODIFY COLUMN load_15 DROP DEFAULT; 删除默认值后,该列将使用 `NULL` 作为默认值。数据库只允许对可为空的列删除默认值。 + + ### 修改表的参数 `ALTER TABLE` 语句也可以用来更改表的选项。 @@ -282,6 +284,8 @@ ALTER TABLE sensor_readings SPLIT PARTITION ( 必须开启共享对象存储和 GC,并确保所有 datanode 都能访问同一对象存储后再执行这些语句。 ::: + + ### 创建列的索引 在列上启用倒排索引: diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-1.1/reference/sql/case.md b/i18n/zh/docusaurus-plugin-content-docs/version-1.1/reference/sql/case.md index 9bcb03ca6c..be7638c604 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-1.1/reference/sql/case.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-1.1/reference/sql/case.md @@ -30,7 +30,7 @@ END ### 在 `SELECT` 中使用 `CASE` 在 `SELECT` 子句中,你可以使用 `CASE` 语句根据条件创建新列。 -请参阅查询数据指南中的[示例](/user-guide/query-data/sql.md#case)。 +请参阅查询数据指南中的[示例](/user-guide/query-data/sql.md#case-expression)。 你还可以将 `CASE` 与 `SUM` 等函数一起使用,以有条件地聚合数据。 例如,你可以计算状态码为 200 和 404 的日志总数: diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-1.1/reference/sql/compatibility.md b/i18n/zh/docusaurus-plugin-content-docs/version-1.1/reference/sql/compatibility.md index 56c899fd36..997bb0015d 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-1.1/reference/sql/compatibility.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-1.1/reference/sql/compatibility.md @@ -13,12 +13,12 @@ GreptimeDB 支持的 SQL 是 ANSI SQL 的子集,并且拥有一些特有的扩 * GreptimeDB 是原生的分布式数据库,因此分布式表的建表语句支持分区规则,也请参考[CREATE](./create.md) 建表语法一节。 2. 插入新数据:与 ANSI SQL 语法一致,但是强制要求提供 `TIME INDEX` 列值(或默认值)。 3. 更新:不支持 `UPDATE` 语法,但是在 `INSERT` 的时候,如果主键和 `TIME INDEX` 对应的列值一样,那么后续插入的行将覆盖以前写入的行,从而变相实现更新。 - * 从 0.8 开始,GreptimeDB 支持 [append 模式](/reference/sql/create.md#创建-Append-Only-表),创建时指定`append_mode = "true"` 选项的表将保留重复的数据行。 - * GreptimeDB 支持 [merge 模式](/reference/sql/create.md#create-an-append-only-table),该模式使用 `merge_mode="last_non_null"` 选项创建表,允许部分更新字段。 + * 从 0.8 开始,GreptimeDB 支持 [append 模式](/reference/sql/create.md#create-an-append-only-table),创建时指定`append_mode = "true"` 选项的表将保留重复的数据行。 + * GreptimeDB 支持 [merge 模式](/reference/sql/create.md#create-a-table-with-merge-mode),该模式使用 `merge_mode="last_non_null"` 选项创建表,允许部分更新字段。 4. 查询:查询语法兼容 ANSI SQL,存在部分功能差异和缺失 * 从 v0.9.0 开始支持[视图](/user-guide/query-data/view.md)。 * TQL 语法扩展:TQL 子命令支持在 SQL 中执行 PromQL,详细请参考 [TQL](./tql.md) 一节。 - * [Range Query](/reference/sql/range.md#range-query) 支持按照指定窗口来查询和聚合时序数据。 + * [Range Query](/reference/sql/range.md) 支持按照指定窗口来查询和聚合时序数据。 5. 删除数据:语法与 ANSI SQL 基本一致。 6. 他项: * 标识符,如表名,列名等,约束与 ANSI SQL 类似,大小写敏感,遇到特殊字符或者大写需要用双引号括起来。 diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-1.1/reference/sql/create.md b/i18n/zh/docusaurus-plugin-content-docs/version-1.1/reference/sql/create.md index 20e5ee9f0b..0cd76432dc 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-1.1/reference/sql/create.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-1.1/reference/sql/create.md @@ -144,6 +144,8 @@ ENGINE = engine WITH([TTL | storage | ...] = expr, ...) GreptimeDB 提供了丰富的索引实现来加速查询,请在[索引](/user-guide/manage-data/data-index.md)章节查看更多信息。 + + ### 表选项 用户可以使用 `WITH` 添加表选项。有效的选项包括以下内容: @@ -216,6 +218,8 @@ with( ); ``` + + #### 创建 Append-Only 表 创建一个 append-only 表来关闭去重 ```sql @@ -225,6 +229,8 @@ CREATE TABLE IF NOT EXISTS temperatures( ) with('append_mode'='true'); ``` + + #### 创建带有 merge 模式的表 创建一个带有 `last_row` merge 模式的表,这是默认的 merge 模式。 @@ -406,6 +412,8 @@ CREATE TABLE system_metrics ( Query OK, 0 rows affected (0.01 sec) ``` + + #### `INDEX` 列选项 更多关于索引配置、性能对比和使用指南的信息,请参考[索引](/user-guide/manage-data/data-index.md)章节。 @@ -541,7 +549,7 @@ CREATE [OR REPLACE] VIEW [ IF NOT EXISTS ] AS select_statement ``` -用于创建或更新视图,请阅读[视图用户指南](/user-guide/query-data/view.md#视图)。 +用于创建或更新视图,请阅读[视图用户指南](/user-guide/query-data/view.md#view)。 ## 创建 Trigger diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-1.1/reference/sql/data-types.md b/i18n/zh/docusaurus-plugin-content-docs/version-1.1/reference/sql/data-types.md index b54caf9757..bacc96e29c 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-1.1/reference/sql/data-types.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-1.1/reference/sql/data-types.md @@ -79,6 +79,8 @@ SELECT * FROM decimals; 使用 MySQL/PostgreSQL 协议写入时间戳字符串字面量时,值的范围限制为 '0001-01-01 00:00:00' 到 '9999-12-31 23:59:59'。 ::: + + ### Interval 类型详解 `Interval` 类型用于需要跟踪和操作时间间隔的场景。它的编写语法如下: @@ -232,6 +234,8 @@ public=> SELECT INTERVAL '1 year 2 month'; (1 row) ``` + + ## JSON 类型(实验功能) :::warning @@ -265,7 +269,7 @@ SELECT * FROM json_data; ### 查询 JSON 数据 -您可以直接查询 JSON 数据,也可以使用 GreptimeDB 提供的 [JSON 函数](./functions/overview.md#json-functions) 提取特定字段。以下是一个示例: +您可以直接查询 JSON 数据,也可以使用 GreptimeDB 提供的 [JSON 函数](./functions/json.md) 提取特定字段。以下是一个示例: ```sql SELECT json_get_string(my_json, '$.name') as name FROM json_data; diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-1.1/reference/sql/group_by.md b/i18n/zh/docusaurus-plugin-content-docs/version-1.1/reference/sql/group_by.md index c7b5cfc0f1..862c097dc1 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-1.1/reference/sql/group_by.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-1.1/reference/sql/group_by.md @@ -70,4 +70,4 @@ FROM system_metrics GROUP BY dt ``` -请参考 [date_trunc](./functions/overview.md#date_trunc) 获取更多信息。 +请参考 [date_trunc](./functions/df-functions.md#date_trunc) 获取更多信息。 diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-1.1/reference/sql/range.md b/i18n/zh/docusaurus-plugin-content-docs/version-1.1/reference/sql/range.md index 728648c0a1..2105aa435d 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-1.1/reference/sql/range.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-1.1/reference/sql/range.md @@ -39,6 +39,8 @@ INTERVAL := TIME_INTERVAL | ( INTERVAL expr ) - 关键字 `FILL`,可以跟在一个 Range 表达式后,详情请见[FILL Option](#fill-选项) 。 + + ## `FILL` 选项 `FILL` 选项指定了在某个聚合的时间片上没有数据,或者聚合字段的值为空时的数据填充方法。 diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-1.1/user-guide/concepts/features-that-you-concern.md b/i18n/zh/docusaurus-plugin-content-docs/version-1.1/user-guide/concepts/features-that-you-concern.md index 37b8207fd8..0b8d79a095 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-1.1/user-guide/concepts/features-that-you-concern.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-1.1/user-guide/concepts/features-that-you-concern.md @@ -17,7 +17,7 @@ GreptimeDB 将所有可观测数据——metrics、logs、traces——作为带 ## 支持删除数据吗? -支持,参见[删除数据](/user-guide/ingest-data/overview.md#删除数据)。 +支持,参见[删除数据](/user-guide/manage-data/overview.md#删除数据)。 ## 可以按表设置 TTL 或保留策略吗? @@ -79,7 +79,7 @@ GreptimeDB 通过多层手段解决高基数挑战: ## 支持 JSON 数据吗? -支持,参见 [JSON 函数](/reference/sql/functions/overview.md#json-functions)。 +支持,参见 [JSON 函数](/reference/sql/functions/json.md)。 ## 更多问题? diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-1.1/user-guide/deployments-administration/configuration.md b/i18n/zh/docusaurus-plugin-content-docs/version-1.1/user-guide/deployments-administration/configuration.md index a66e782748..56c853a77a 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-1.1/user-guide/deployments-administration/configuration.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-1.1/user-guide/deployments-administration/configuration.md @@ -29,6 +29,8 @@ greptime standalone start --http-addr 127.0.0.1:4000 有关 Greptime 命令行支持的所有选项,请参阅 [GreptimeDB 命令行界面](/reference/command-lines/overview.md)。 + + ### 配置文件选项 你可以在 TOML 文件中指定配置项。 @@ -152,6 +154,8 @@ concurrent_query_limiter_timeout = "100ms" | `max_concurrent_queries` | 整数 | `0` | Datanode 上允许同时运行的最大读取查询数量。设置为 `0` 表示禁用限制。 | | `concurrent_query_limiter_timeout` | 字符串 | `"100ms"` | 当达到 `max_concurrent_queries` 后,查询等待可用名额的最长时间。如果超时后仍然没有可用名额,查询将失败。 | + + ### 协议选项 协议选项适用于 `frontend` 和 `standalone` 子命令,它指定了协议服务器地址和其他协议相关的选项。 @@ -277,6 +281,8 @@ max_inflight_requests = 3000 parallelism = 0 ``` + + ### 存储选项 `存储`选项在 `datanode` 和 `standalone` 模式下有效,它指定了数据库数据目录和其他存储相关的选项。 @@ -428,6 +434,8 @@ default_ratio = 1.0 如何使用分布式追踪,请参考 [Tracing](/user-guide/deployments-administration/monitoring/tracing.md#教程使用-jaeger-追踪-greptimedb-调用链路) + + ### Region 引擎选项 datanode 和 standalone 在 `[region_engine]` 部分可以配置不同存储引擎的对应参数。目前可以配置 `mito` 和 `metric` 存储引擎的选项。 @@ -604,6 +612,8 @@ default_timezone = "UTC" `default_timezone` 的值可以是任何时区名称,例如 `Europe/Berlin` 或 `Asia/Shanghai`。 有关客户端时区如何影响数据的写入和查询,请参阅[时区](/user-guide/timezone.md#时区对-sql-语句的影响)文档。 + + ### 仅限于 Metasrv 的配置 ```toml diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-1.1/user-guide/deployments-administration/deploy-on-kubernetes/common-helm-chart-configurations.md b/i18n/zh/docusaurus-plugin-content-docs/version-1.1/user-guide/deployments-administration/deploy-on-kubernetes/common-helm-chart-configurations.md index 818fdc592e..11376de5d3 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-1.1/user-guide/deployments-administration/deploy-on-kubernetes/common-helm-chart-configurations.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-1.1/user-guide/deployments-administration/deploy-on-kubernetes/common-helm-chart-configurations.md @@ -480,6 +480,8 @@ debugPod: cpu: 200m ``` + + ### 配置 Metasrv 后端存储 #### 使用 MySQL 和 PostgreSQL 作为后端存储 @@ -585,6 +587,8 @@ meta: - `etcd.endpoints`: etcd 服务地址。 - `etcd.storeKeyPrefix`: etcd 存储 key 前缀。所有 key 都会被存储在这个前缀下。如果你希望使用一个 etcd 集群为多个 GreptimeDB 集群提供服务,你可以为每个 GreptimeDB 集群配置不同的存储 key 前缀。这仅用于测试和调试目的。 + + ### 启用 Region Failover 你可以通过 `meta.enableRegionFailover` 字段启用 Region Failover。在启用 Region Failover 之前,请确保你的部署满足 [Region Failover](/user-guide/deployments-administration/manage-data/region-failover.md) 文档中的先决条件。如果你的配置不满足条件,**Operator 将无法部署集群组件**。 diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-1.1/user-guide/deployments-administration/deploy-on-kubernetes/deploy-greptimedb-cluster.md b/i18n/zh/docusaurus-plugin-content-docs/version-1.1/user-guide/deployments-administration/deploy-on-kubernetes/deploy-greptimedb-cluster.md index 843c93166b..4547556995 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-1.1/user-guide/deployments-administration/deploy-on-kubernetes/deploy-greptimedb-cluster.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-1.1/user-guide/deployments-administration/deploy-on-kubernetes/deploy-greptimedb-cluster.md @@ -227,6 +227,8 @@ http://etcd-2.etcd-headless.etcd-cluster.svc.cluster.local:2379 is healthy: succ ``` + + ## 配置 `values.yaml` `values.yaml` 文件设置了 GreptimeDB 的一些参数和配置,是定义 helm chart 的关键。 @@ -393,6 +395,8 @@ kubectl -n default port-forward --address 0.0.0.0 svc/mycluster-frontend 4000:40 如果你想使用其他工具如 `mysql` 或 `psql` 来连接 GreptimeDB 集群,你可以参考 [快速入门](/getting-started/quick-start.md)。 + + ## 删除集群 :::danger diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-1.1/user-guide/deployments-administration/manage-data/basic-table-operations.md b/i18n/zh/docusaurus-plugin-content-docs/version-1.1/user-guide/deployments-administration/manage-data/basic-table-operations.md index d99d5f87b3..086148c309 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-1.1/user-guide/deployments-administration/manage-data/basic-table-operations.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-1.1/user-guide/deployments-administration/manage-data/basic-table-operations.md @@ -68,6 +68,8 @@ SHOW DATABASES LIKE 'p%'; USE test; ``` + + ## 创建表 :::tip NOTE @@ -222,7 +224,7 @@ SHOW INDEXES FROM monitor; +---------+------------+------------+--------------+-------------+-----------+-------------+----------+--------+------+-------------------------+---------+---------------+---------+------------+ ``` -有关 `SHOW` 语句的更多信息,请阅读 [SHOW 参考](/reference/sql/show.md#show)。 +有关 `SHOW` 语句的更多信息,请阅读 [SHOW 参考](/reference/sql/show.md)。 ## 列出现有的表 diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-1.1/user-guide/deployments-administration/manage-data/table-sharding.md b/i18n/zh/docusaurus-plugin-content-docs/version-1.1/user-guide/deployments-administration/manage-data/table-sharding.md index 9c6f130f00..cb92bbf7f8 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-1.1/user-guide/deployments-administration/manage-data/table-sharding.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-1.1/user-guide/deployments-administration/manage-data/table-sharding.md @@ -39,6 +39,8 @@ GreptimeDB 中的一个 region 具有相对固定的吞吐量, 有关分区和 region 之间关系的更多信息,请参阅贡献者指南中的[表分片](/contributor-guide/frontend/table-sharding.md)部分。 + + ## 分区 在 GreptimeDB 中,表可以按列值范围进行水平分区。 diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-1.1/user-guide/deployments-administration/monitoring/check-db-status.md b/i18n/zh/docusaurus-plugin-content-docs/version-1.1/user-guide/deployments-administration/monitoring/check-db-status.md index c0a8e300a9..72305acc12 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-1.1/user-guide/deployments-administration/monitoring/check-db-status.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-1.1/user-guide/deployments-administration/monitoring/check-db-status.md @@ -8,6 +8,8 @@ description: 通过 HTTP 接口检查 GreptimeDB 的健康状态、部署状态 GreptimeDB 包含了一系列的 HTTP 接口可供查询 GreptimeDB 的运行情况。 以下发起的 HTTP 请求均假定 GreptimeDB 运行在节点 `127.0.0.1` 上,其 HTTP 服务监听默认的 `4000` 端口。 + + ## 查看 GreptimeDB 是否正常运行: 你可以使用 `/health` 接口检查 GreptimeDB 是否正常运行。 @@ -34,6 +36,8 @@ date: Sun, 26 Apr 2026 13:46:41 GMT 有关健康检查接口的更多信息,请参考[健康检查接口](/reference/http-endpoints.md#健康检查)。 + + ## 查看 GreptimeDB 的部署状态 你可以使用 `/status` 接口检查 GreptimeDB 的部署状态。 diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-1.1/user-guide/deployments-administration/monitoring/cluster-monitoring-deployment.md b/i18n/zh/docusaurus-plugin-content-docs/version-1.1/user-guide/deployments-administration/monitoring/cluster-monitoring-deployment.md index a59a4bfad0..bfebb01456 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-1.1/user-guide/deployments-administration/monitoring/cluster-monitoring-deployment.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-1.1/user-guide/deployments-administration/monitoring/cluster-monitoring-deployment.md @@ -103,7 +103,7 @@ mycluster-monitor-standalone-0 1/1 Running 0 6m35s kubectl -n default port-forward svc/mycluster-grafana 18080:80 ``` -请参考[访问 Grafana 仪表盘](#访问-grafana仪表盘)章节来查看相应的数据面板。 +请参考[访问 Grafana 仪表盘](#访问-grafana-仪表盘)章节来查看相应的数据面板。 ## 配置监控数据的收集 diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-1.1/user-guide/deployments-administration/performance-tuning/design-table.md b/i18n/zh/docusaurus-plugin-content-docs/version-1.1/user-guide/deployments-administration/performance-tuning/design-table.md index 427cbcbca5..8a5b0264e3 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-1.1/user-guide/deployments-administration/performance-tuning/design-table.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-1.1/user-guide/deployments-administration/performance-tuning/design-table.md @@ -371,10 +371,10 @@ CREATE TABLE IF NOT EXISTS `raw_logs` ( ``` `message` 字段使用 `FULLTEXT INDEX` 选项进行全文索引。 -更多信息请参见[fulltext 列选项](/reference/sql/create.md#fulltext-列选项)。 +更多信息请参见[fulltext 列选项](/reference/sql/create.md#index-column-option)。 存储和查询结构化日志通常比带有全文索引的非结构化日志性能更好。 -建议[使用 Pipeline](/user-guide/logs/quick-start.md#创建-pipeline) 将日志转换为结构化日志。 +建议[使用 Pipeline](/user-guide/logs/use-custom-pipelines.md#create-a-pipeline) 将日志转换为结构化日志。 ### 何时使用索引 diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-1.1/user-guide/flow-computation/continuous-aggregation.md b/i18n/zh/docusaurus-plugin-content-docs/version-1.1/user-guide/flow-computation/continuous-aggregation.md index 63182a60a2..be98ddcde5 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-1.1/user-guide/flow-computation/continuous-aggregation.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-1.1/user-guide/flow-computation/continuous-aggregation.md @@ -398,6 +398,8 @@ SELECT * FROM ngx_distribution; 6 rows in set (0.00 sec) ``` + + ## 将 TQL 与 Flow 结合使用进行高级时序分析 :::warning 实验性特性 diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-1.1/user-guide/flow-computation/manage-flow.md b/i18n/zh/docusaurus-plugin-content-docs/version-1.1/user-guide/flow-computation/manage-flow.md index 0f68892702..6978f321ca 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-1.1/user-guide/flow-computation/manage-flow.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-1.1/user-guide/flow-computation/manage-flow.md @@ -223,6 +223,8 @@ SELECT AGGR_FUNCTION(column1, column2,..) [, TIME_WINDOW_FUNCTION() as time_wind 有关如何在实时分析、监控和仪表板中使用持续聚合的更多示例,请参阅[持续聚合](./continuous-aggregation.md)。 + + ### 定义时间窗口 时间窗口是持续聚合查询的重要属性。 diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-1.1/user-guide/ingest-data/for-iot/grpc-sdks/go.md b/i18n/zh/docusaurus-plugin-content-docs/version-1.1/user-guide/ingest-data/for-iot/grpc-sdks/go.md index 5ee1b429dd..99246c8d1f 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-1.1/user-guide/ingest-data/for-iot/grpc-sdks/go.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-1.1/user-guide/ingest-data/for-iot/grpc-sdks/go.md @@ -191,6 +191,8 @@ if err != nil { affected, err := cli.CloseStream(ctx) ``` + + ## 高级 API SDK 的高级 API 使用 ORM 风格的对象写入数据, @@ -247,7 +249,7 @@ affected, err := cli.CloseStream(ctx) ## 插入 JSON 类型的数据 -GreptimeDB 支持使用 [JSON 类型数据](/reference/sql/data-types.md#json-类型) 存储复杂的数据结构。 +GreptimeDB 支持使用 [JSON 类型数据](/reference/sql/data-types.md#json-type-experimental) 存储复杂的数据结构。 使用此 ingester 库,你可以通过字符串值插入 JSON 数据。 假如你有一个名为 `sensor_readings` 的表,并希望添加一个名为 `attributes` 的 JSON 列, 请参考以下代码片段。 diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-1.1/user-guide/ingest-data/for-iot/grpc-sdks/java.md b/i18n/zh/docusaurus-plugin-content-docs/version-1.1/user-guide/ingest-data/for-iot/grpc-sdks/java.md index 069249bfd7..e9210acb4c 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-1.1/user-guide/ingest-data/for-iot/grpc-sdks/java.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-1.1/user-guide/ingest-data/for-iot/grpc-sdks/java.md @@ -164,7 +164,7 @@ table.complete(); CompletableFuture> future = client.write(table); ``` -GreptimeDB 支持使用 [JSON 类型数据](/reference/sql/data-types.md#json-类型) 存储复杂的数据结构。你可以在表结构中定义 JSON 列,并使用 Map 对象插入数据: +GreptimeDB 支持使用 [JSON 类型数据](/reference/sql/data-types.md#json-type-experimental) 存储复杂的数据结构。你可以在表结构中定义 JSON 列,并使用 Map 对象插入数据: ```java // 为 sensor_readings 构建表结构 diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-1.1/user-guide/ingest-data/for-iot/sql.md b/i18n/zh/docusaurus-plugin-content-docs/version-1.1/user-guide/ingest-data/for-iot/sql.md index 3023b6632b..42715296ef 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-1.1/user-guide/ingest-data/for-iot/sql.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-1.1/user-guide/ingest-data/for-iot/sql.md @@ -73,6 +73,8 @@ VALUES 通过上面的语句,我们成功的向 `monitor` 表中插入了六条数据。请参考 [`INSERT`](/reference/sql/insert.md) 获得更多写入数据的相关信息。 + + ## 时区 SQL 客户端中指定的时区将影响没有时区信息的字符串格式的时间戳。 diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-1.1/user-guide/ingest-data/for-observability/kafka.md b/i18n/zh/docusaurus-plugin-content-docs/version-1.1/user-guide/ingest-data/for-observability/kafka.md index 32b85f6a60..4514c7c639 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-1.1/user-guide/ingest-data/for-observability/kafka.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-1.1/user-guide/ingest-data/for-observability/kafka.md @@ -49,6 +49,8 @@ tls = {} 当 Vector 使用 `decoding.codec = "influxdb"` 解析 Kafka 消息,并通过 `greptimedb_metrics` sink 写入时,每个 InfluxDB field 都会被转换为一个 metric 名称。例如,`census bees=23` 会写入名为 `census_bees` 的表,值存储在 `val` 列中。 + + ## 日志 开发人员通常处理两种类型的日志:JSON 日志和纯文本日志。 diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-1.1/user-guide/ingest-data/for-observability/loki.md b/i18n/zh/docusaurus-plugin-content-docs/version-1.1/user-guide/ingest-data/for-observability/loki.md index 4a9efeda75..fc02b2d50c 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-1.1/user-guide/ingest-data/for-observability/loki.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-1.1/user-guide/ingest-data/for-observability/loki.md @@ -132,6 +132,8 @@ WITH( 1 row in set (0.00 sec) ``` + + ## 在 Loki Push API 中使用 pipeline GreptimeDB 支持使用 pipeline 来处理 Loki Push 请求。 diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-1.1/user-guide/ingest-data/for-observability/prometheus.md b/i18n/zh/docusaurus-plugin-content-docs/version-1.1/user-guide/ingest-data/for-observability/prometheus.md index eafabaecb7..8b637d4513 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-1.1/user-guide/ingest-data/for-observability/prometheus.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-1.1/user-guide/ingest-data/for-observability/prometheus.md @@ -7,6 +7,8 @@ description: 介绍如何将 GreptimeDB 作为 Prometheus 的长期存储解决 GreptimeDB 可以作为 Prometheus 的长期存储解决方案,提供无缝集成体验。 + + ## 配置 Remote Write ### Prometheus 配置文件 @@ -42,6 +44,8 @@ remote_read: 如果你使用 Vector ,请在 Vector 配置文件(`vector.toml`)中配置 Remote Write。有关更多信息,请参阅 [Vector 文档](vector.md#使用-prometheus-remote-write-协议). + + ## 数据模型 在 GreptimeDB 的[数据模型](/user-guide/concepts/data-model.md)中,数据被组织成具有 tag、time index 和 field 的表。 @@ -151,6 +155,8 @@ WHERE greptime_timestamp > '2024-08-07 03:27:26.964000' AND job = 'job1'; ``` + + ### 在 GreptimeDB 集群上使用 metric engine 在使用 Prometheus remote write 写入 GreptimeDB 集群时,用户可能注意到集群中只有 diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-1.1/user-guide/ingest-data/for-observability/vector.md b/i18n/zh/docusaurus-plugin-content-docs/version-1.1/user-guide/ingest-data/for-observability/vector.md index 24724bbb48..8e0887fa3e 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-1.1/user-guide/ingest-data/for-observability/vector.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-1.1/user-guide/ingest-data/for-observability/vector.md @@ -124,6 +124,8 @@ GreptimeDB 支持多种日志数据写入方式,包括: 我们强烈建议所有的用户使用 `greptimedb_logs` sink 来写入日志数据,因为它是为 GreptimeDB 优化的,能够更好地支持 GreptimeDB 的特性。 并且推荐开启各种协议的压缩功能,以提高数据传输效率。 + + ### 使用 `greptimedb_logs` sink (推荐) ```toml diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-1.1/user-guide/logs/manage-pipelines.md b/i18n/zh/docusaurus-plugin-content-docs/version-1.1/user-guide/logs/manage-pipelines.md index d4b0618da6..5afe3cb1d9 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-1.1/user-guide/logs/manage-pipelines.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-1.1/user-guide/logs/manage-pipelines.md @@ -15,6 +15,8 @@ description: 介绍如何在 GreptimeDB 中管理 Pipeline,包括创建、删 在使用 HTTP API 进行 Pipeline 管理时,你需要提供有效的鉴权信息。 请参考[鉴权](/user-guide/protocols/http.md#鉴权)文档了解详细信息。 + + ## 上传 Pipeline GreptimeDB 提供了专用的 HTTP 接口用于创建 Pipeline。 diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-1.1/user-guide/logs/quick-start.md b/i18n/zh/docusaurus-plugin-content-docs/version-1.1/user-guide/logs/quick-start.md index 9f7ca6b7cd..d1360fad09 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-1.1/user-guide/logs/quick-start.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-1.1/user-guide/logs/quick-start.md @@ -18,6 +18,8 @@ GreptimeDB 提供了强大的基于 pipeline 的日志写入系统。 - 灵活支持变化的日志结构 - 需要最少的配置即可开始使用 + + ## 直接通过 HTTP 写入日志 GreptimeDB 日志写入最简单的方法是通过使用 `greptime_identity` pipeline 发送 HTTP 请求。 diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-1.1/user-guide/logs/use-custom-pipelines.md b/i18n/zh/docusaurus-plugin-content-docs/version-1.1/user-guide/logs/use-custom-pipelines.md index 00ae5467e0..2b6efa907a 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-1.1/user-guide/logs/use-custom-pipelines.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-1.1/user-guide/logs/use-custom-pipelines.md @@ -28,6 +28,8 @@ GreptimeDB 能够将日志自动解析和转换为多列的结构化数据, 127.0.0.1 - - [25/May/2024:20:16:37 +0000] "GET /index.html HTTP/1.1" 200 612 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36" ``` + + ## 创建自定义 Pipeline GreptimeDB 提供 HTTP 接口用于创建 pipeline。 @@ -103,6 +105,8 @@ transform: 有关 pipeline 配置选项的详细信息, 请参考 [Pipeline 配置](/reference/pipeline/pipeline-config.md) 文档。 + + ## 上传 Pipeline 执行以下命令上传 pipeline 配置: @@ -124,6 +128,8 @@ curl -X "POST" \ 所有 pipeline 都存储在 `greptime_private.pipelines` 表中。 参考[查询 Pipeline](manage-pipelines.md#查询-pipeline) 来查看 pipeline 数据。 + + ## 使用 Pipeline 写入日志 以下示例使用 `nginx_pipeline` pipeline 将日志写入 `custom_pipeline_logs` 表来格式化和转换日志消息: diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-1.1/user-guide/manage-data/data-index.md b/i18n/zh/docusaurus-plugin-content-docs/version-1.1/user-guide/manage-data/data-index.md index d04ce525ee..9475c00592 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-1.1/user-guide/manage-data/data-index.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-1.1/user-guide/manage-data/data-index.md @@ -41,6 +41,8 @@ CREATE TABLE monitoring_data ( 需要注意的是,当列的基数非常大时,倒排索引可能会带来较高的维护成本,导致内存占用增加和索引体积膨胀。这种情况下,建议考虑使用跳数索引作为替代方案。 + + ### 跳数索引 跳数索引是专为列式存储系统(如 GreptimeDB)优化设计的索引类型。它通过维护数据块内值域范围的元数据,使查询引擎能够在进行范围查询时快速跳过不相关的数据块。与其他索引相比,跳数索引的存储开销相对较小。 diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-1.1/user-guide/protocols/http.md b/i18n/zh/docusaurus-plugin-content-docs/version-1.1/user-guide/protocols/http.md index 3a8ceb1629..46c8d6563a 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-1.1/user-guide/protocols/http.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-1.1/user-guide/protocols/http.md @@ -18,6 +18,8 @@ API 的 Base URL 是 `http(s)://:/`。 ## 通用 Headers + + ### 鉴权 假设你已经正确设置了数据库[鉴权](/user-guide/deployments-administration/authentication/overview.md), @@ -111,6 +113,8 @@ http://localhost:4000/v1/sql 请参考 [Admin APIs 接口](/reference/http-endpoints.md#管理-api)文档以获取更多信息。 + + ## POST SQL 语句 要通过 HTTP API 向 GreptimeDB 服务器提交 SQL 语句,请使用以下格式: @@ -153,6 +157,8 @@ curl -X POST \ - `sql`: SQL 语句。必填。 + + ### 响应 响应是一个 JSON 对象,包含以下字段: diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-1.1/user-guide/query-data/promql.md b/i18n/zh/docusaurus-plugin-content-docs/version-1.1/user-guide/query-data/promql.md index bb21e059a0..7aac91bd04 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-1.1/user-guide/query-data/promql.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-1.1/user-guide/query-data/promql.md @@ -7,6 +7,8 @@ description: 介绍 GreptimeDB 对 Prometheus 查询语言(PromQL)的支持 GreptimeDB 可以作为 Grafana 中 Prometheus 的替代品,因为 GreptimeDB 支持 PromQL(Prometheus Query Language)。GreptimeDB 在 Rust 中重新实现了 PromQL,并通过接口将能力开放,包括 Prometheus 的 HTTP API、GreptimeDB 的 HTTP API 和 SQL 接口。 + + ## Prometheus 的 HTTP API @@ -286,4 +288,4 @@ PromQL 的时间戳精度受制于查询语法的限制,最高只支持毫秒 - 不支持: -无 \ No newline at end of file +无 diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-1.1/user-guide/query-data/sql.md b/i18n/zh/docusaurus-plugin-content-docs/version-1.1/user-guide/query-data/sql.md index b586e46fbb..435b5a8ce7 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-1.1/user-guide/query-data/sql.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-1.1/user-guide/query-data/sql.md @@ -257,6 +257,8 @@ http://localhost:4000/v1/sql 有关请求 hints 的更多信息,请参阅 [HTTP hints](/user-guide/protocols/http.md#hints)。 + + ## `CASE` 表达式 你可以使用 `CASE` 表达式在查询中执行条件逻辑。 diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-1.1/user-guide/query-data/view.md b/i18n/zh/docusaurus-plugin-content-docs/version-1.1/user-guide/query-data/view.md index 5b8825ade4..6833328250 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-1.1/user-guide/query-data/view.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-1.1/user-guide/query-data/view.md @@ -3,6 +3,8 @@ keywords: [视图, SQL 视图, 创建视图, 更新视图, 删除视图, 显示 description: 介绍了视图的定义、使用示例、更新、显示定义、列出视图和删除视图的方法。 --- + + # 视图 在 SQL 中,视图(View)是基于 SQL 语句的结果集的虚拟表。 diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-1.1/user-guide/traces/read-write.md b/i18n/zh/docusaurus-plugin-content-docs/version-1.1/user-guide/traces/read-write.md index 8b26e141d2..eea3dccb22 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-1.1/user-guide/traces/read-write.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-1.1/user-guide/traces/read-write.md @@ -121,6 +121,8 @@ GreptimeDB 的 OTEL 端点支持 Basic 认证。详情请参考 [鉴权](/user-g 通过此接口创建的表,默认为[Append-only 模 式](/user-guide/deployments-administration/performance-tuning/design-table.md#何时使用-append-only-表). + + ## 查询 GreptimeDB 提供了两种 Trace 数据的查询接口,分别是 Jaeger API 兼容接口和 diff --git a/package.json b/package.json index 2f04cbaa4b..109c3af4d4 100644 --- a/package.json +++ b/package.json @@ -10,6 +10,7 @@ "start:zh": "DOC_LANG=zh pnpm start", "prebuild": "pnpm sync-skill", "build": "docusaurus build", + "check:links": "DOCS_LINK_CHECK=true pnpm build", "swizzle": "docusaurus swizzle", "deploy": "docusaurus deploy", "clear": "docusaurus clear", diff --git a/src/components/AnchorAlias/index.tsx b/src/components/AnchorAlias/index.tsx new file mode 100644 index 0000000000..6fe2a36efb --- /dev/null +++ b/src/components/AnchorAlias/index.tsx @@ -0,0 +1,12 @@ +import React from 'react'; +import useBrokenLinks from '@docusaurus/useBrokenLinks'; + +type AnchorAliasProps = { + id: string; +}; + +export default function AnchorAlias({id}: AnchorAliasProps) { + useBrokenLinks().collectAnchor(id); + + return