Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[typo](docs) Aggregate Mode: Keep the sample code and documentation consistent #1918

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions docs/table-design/data-model/aggregate.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,17 +63,17 @@ When creating a table, the **AGGREGATE KEY** keyword can be used to specify the
CREATE TABLE IF NOT EXISTS example_tbl_agg
(
user_id LARGEINT NOT NULL,
load_dt DATE NOT NULL,
load_date DATE NOT NULL,
city VARCHAR(20),
last_visit_dt DATETIME REPLACE DEFAULT "1970-01-01 00:00:00",
cost BIGINT SUM DEFAULT "0",
max_dwell INT MAX DEFAULT "0",
)
AGGREGATE KEY(user_id, date, city)
AGGREGATE KEY(user_id, load_date, city)
DISTRIBUTED BY HASH(user_id) BUCKETS 10;
```

In the example above, a fact table for user information and access behavior is defined, where `user_id`, `load_date`, `city`, and `age` are used as Key columns for aggregation. During data import, the Key columns are aggregated into one row, and the Value columns are aggregated according to the specified aggregation types. The following types of dimension aggregation are supported in the Aggregate Model:
In the example above, a fact table for user information and access behavior is defined, where `user_id`, `load_date` and `city` are used as Key columns for aggregation. During data import, the Key columns are aggregated into one row, and the Value columns are aggregated according to the specified aggregation types. The following types of dimension aggregation are supported in the Aggregate Model:

* **SUM**: Sum, the values of multiple rows are added together.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,17 +62,17 @@ Doris 的聚合模型是为了高效地处理大规模数据查询中的聚合
CREATE TABLE IF NOT EXISTS example_tbl_agg
(
user_id LARGEINT NOT NULL,
load_dt DATE NOT NULL,
load_date DATE NOT NULL,
city VARCHAR(20),
last_visit_dt DATETIME REPLACE DEFAULT "1970-01-01 00:00:00",
cost BIGINT SUM DEFAULT "0",
max_dwell INT MAX DEFAULT "0",
)
AGGREGATE KEY(user_id, date, city)
AGGREGATE KEY(user_id, load_date, city)
DISTRIBUTED BY HASH(user_id) BUCKETS 10;
```

上例中定义了用户信息和访问的行为事实表,将 `user_id`、`load_date`、`city` 及 `age` 作为 Key 列进行聚合操作。数据导入时,Key 列会聚合成一行,Value 列会按照指定的聚合类型进行维度聚合。在聚合表中支持一下类型的维度聚合:
上例中定义了用户信息和访问的行为事实表,将 `user_id`、`load_date` 及 `city` 作为 Key 列进行聚合操作。数据导入时,Key 列会聚合成一行,Value 列会按照指定的聚合类型进行维度聚合。在聚合表中支持一下类型的维度聚合:

* SUM:求和,多行的 Value 进行累加。

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,17 +62,17 @@ Doris 的聚合模型是为了高效地处理大规模数据查询中的聚合
CREATE TABLE IF NOT EXISTS example_tbl_agg
(
user_id LARGEINT NOT NULL,
load_dt DATE NOT NULL,
load_date DATE NOT NULL,
city VARCHAR(20),
last_visit_dt DATETIME REPLACE DEFAULT "1970-01-01 00:00:00",
cost BIGINT SUM DEFAULT "0",
max_dwell INT MAX DEFAULT "0",
)
AGGREGATE KEY(user_id, date, city)
AGGREGATE KEY(user_id, load_date, city)
DISTRIBUTED BY HASH(user_id) BUCKETS 10;
```

上例中定义了用户信息和访问的行为事实表,将 `user_id`、`load_date`、`city` 及 `age` 作为 Key 列进行聚合操作。数据导入时,Key 列会聚合成一行,Value 列会按照指定的聚合类型进行维度聚合。在聚合表中支持一下类型的维度聚合:
上例中定义了用户信息和访问的行为事实表,将 `user_id`、`load_date` 及 `city` 作为 Key 列进行聚合操作。数据导入时,Key 列会聚合成一行,Value 列会按照指定的聚合类型进行维度聚合。在聚合表中支持一下类型的维度聚合:

* SUM:求和,多行的 Value 进行累加。

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,17 +62,17 @@ Doris 的聚合模型是为了高效地处理大规模数据查询中的聚合
CREATE TABLE IF NOT EXISTS example_tbl_agg
(
user_id LARGEINT NOT NULL,
load_dt DATE NOT NULL,
load_date DATE NOT NULL,
city VARCHAR(20),
last_visit_dt DATETIME REPLACE DEFAULT "1970-01-01 00:00:00",
cost BIGINT SUM DEFAULT "0",
max_dwell INT MAX DEFAULT "0",
)
AGGREGATE KEY(user_id, date, city)
AGGREGATE KEY(user_id, load_date, city)
DISTRIBUTED BY HASH(user_id) BUCKETS 10;
```

上例中定义了用户信息和访问的行为事实表,将 `user_id`、`load_date`、`city` 及 `age` 作为 Key 列进行聚合操作。数据导入时,Key 列会聚合成一行,Value 列会按照指定的聚合类型进行维度聚合。在聚合表中支持一下类型的维度聚合:
上例中定义了用户信息和访问的行为事实表,将 `user_id`、`load_date` 及 `city` 作为 Key 列进行聚合操作。数据导入时,Key 列会聚合成一行,Value 列会按照指定的聚合类型进行维度聚合。在聚合表中支持一下类型的维度聚合:

* SUM:求和,多行的 Value 进行累加。

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,17 +63,17 @@ When creating a table, the **AGGREGATE KEY** keyword can be used to specify the
CREATE TABLE IF NOT EXISTS example_tbl_agg
(
user_id LARGEINT NOT NULL,
load_dt DATE NOT NULL,
load_date DATE NOT NULL,
city VARCHAR(20),
last_visit_dt DATETIME REPLACE DEFAULT "1970-01-01 00:00:00",
cost BIGINT SUM DEFAULT "0",
max_dwell INT MAX DEFAULT "0",
)
AGGREGATE KEY(user_id, date, city)
AGGREGATE KEY(user_id, load_date, city)
DISTRIBUTED BY HASH(user_id) BUCKETS 10;
```

In the example above, a fact table for user information and access behavior is defined, where `user_id`, `load_date`, `city`, and `age` are used as Key columns for aggregation. During data import, the Key columns are aggregated into one row, and the Value columns are aggregated according to the specified aggregation types. The following types of dimension aggregation are supported in the Aggregate Model:
In the example above, a fact table for user information and access behavior is defined, where `user_id`, `load_date` and `city` are used as Key columns for aggregation. During data import, the Key columns are aggregated into one row, and the Value columns are aggregated according to the specified aggregation types. The following types of dimension aggregation are supported in the Aggregate Model:

* **SUM**: Sum, the values of multiple rows are added together.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,17 +63,17 @@ When creating a table, the **AGGREGATE KEY** keyword can be used to specify the
CREATE TABLE IF NOT EXISTS example_tbl_agg
(
user_id LARGEINT NOT NULL,
load_dt DATE NOT NULL,
load_date DATE NOT NULL,
city VARCHAR(20),
last_visit_dt DATETIME REPLACE DEFAULT "1970-01-01 00:00:00",
cost BIGINT SUM DEFAULT "0",
max_dwell INT MAX DEFAULT "0",
)
AGGREGATE KEY(user_id, date, city)
AGGREGATE KEY(user_id, load_date, city)
DISTRIBUTED BY HASH(user_id) BUCKETS 10;
```

In the example above, a fact table for user information and access behavior is defined, where `user_id`, `load_date`, `city`, and `age` are used as Key columns for aggregation. During data import, the Key columns are aggregated into one row, and the Value columns are aggregated according to the specified aggregation types. The following types of dimension aggregation are supported in the Aggregate Model:
In the example above, a fact table for user information and access behavior is defined, where `user_id`, `load_date` and `city` are used as Key columns for aggregation. During data import, the Key columns are aggregated into one row, and the Value columns are aggregated according to the specified aggregation types. The following types of dimension aggregation are supported in the Aggregate Model:

* **SUM**: Sum, the values of multiple rows are added together.

Expand Down