Skip to content

Commit

Permalink
Merge pull request #169 from InterestingLab/rickyhuo.docs.clickhouse
Browse files Browse the repository at this point in the history
Add note in dosc of clickhouse
  • Loading branch information
garyelephant authored Nov 13, 2018
2 parents e8d62ca + 86bf5f1 commit f34e14e
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
6 changes: 6 additions & 0 deletions docs/en/configuration/output-plugins/Clickhouse.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,12 @@ ClickHouse table name.

ClickHouse username, only used when ClickHouse has authority authentication.

### Note

Before the data is written to ClickHouse, all fields need to be converted to the type corresponding to the table structure in ClickHouse.

It should be noted that the corresponding field of the **Date** needs to be converted to String with format of `yyyy-MM-dd` and the corresponding field of the **DateTime** needs to be converted to String with format of `yyyy-MM-dd HH:mm:ss`.

### Examples

```
Expand Down
4 changes: 2 additions & 2 deletions docs/zh-cn/configuration/filter-plugins/Date.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@
date {
source_field = "timestamp"
target_field = "date"
source_field_format = "UNIX"
target_field_format = "yyyy/MM/dd"
source_time_format = "UNIX"
target_time_format = "yyyy/MM/dd"
}
```

Expand Down
6 changes: 6 additions & 0 deletions docs/zh-cn/configuration/output-plugins/Clickhouse.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,12 @@ Clickhouse 表名

Clickhouse用户用户名,仅当Clickhouse中开启权限时需要此字段

### Note

数据在写入ClickHouse之前,所有字段需要转换为ClickHouse中表结构对应的类型。

需要注意的是,Date类型对应字段需要转换为`yyyy-MM-dd`格式字符串。DateTime类型对应字段需要转换为`yyyy-MM-dd HH:mm:ss`格式字符串。

### Examples

```
Expand Down

0 comments on commit f34e14e

Please sign in to comment.