ch-rollup

module
v0.0.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 4, 2024 License: Apache-2.0

README

ch-rollup Go Reference codecov Go Report Card

Rollup your ClickHouse database.

Install

At the moment we provide binary release and OCI image.

Usage

config.json example:

{
  "clickhouse": {
    "address": "127.0.0.1:9000",
    "user_name": "clickhouse",
    "cluster_name": "your_cluster"
  },
  "tasks": [
    {
      "database": "default",
      "table": "table_agg",
      "partition_key": "24h",
      "roll_up_settings": [
        {
          "after": "24h",
          "interval": "1h"
        },
        {
          "after": "7d",
          "interval": "6h"
        }
      ],
      "column_settings": [
        {
          "name": "column"
        },
        {
          "name": "counter",
          "expression": "countStateMerge(counter)"
        },
        {
          "name": "event_time",
          "is_roll_up_time": true
        }
      ]
    }
  ]
}
export CLICKHOUSE_PASSWORD={SECRET}
./ch-rollup

We will provide more detailed documentation in the future.

Known limitations

  • Doesn't support replicas (issue)

Roadmap

The features we want to do are described in the issues

Work group

Join our work group at Telegram to discuss your thoughts, ideas, and collaborate with other developers. We welcome your participation and contributions to our community!

Directories

Path Synopsis
cmd
ch-rollup
Package main is an entrypoint of the application.
Package main is an entrypoint of the application.
internal
buildinfo
Package buildinfo returns info about ch-rollup build.
Package buildinfo returns info about ch-rollup build.
utils/database
Package database implements utils for database.
Package database implements utils for database.
utils/json/duration
Package duration is a utils for working with duration in json.
Package duration is a utils for working with duration in json.
utils/slice
Package slice is a utils for working with slice.
Package slice is a utils for working with slice.
utils/time
Package time is a utils for working with time.
Package time is a utils for working with time.
pkg
app
Package app implements rollup as app.
Package app implements rollup as app.
app/config
Package config defined Config and it Provider.
Package config defined Config and it Provider.
app/config/file
Package file implements File config.Provider.
Package file implements File config.Provider.
app/secret
Package secret defines Secrets and it Provider.
Package secret defines Secrets and it Provider.
app/secret/env
Package env implements Env secret.Provider.
Package env implements Env secret.Provider.
database
Package database declaring ClickHouse Cluster and Shard interface.
Package database declaring ClickHouse Cluster and Shard interface.
database/mock
Package mock is a generated GoMock package.
Package mock is a generated GoMock package.
database/static
Package static implements connect to static Clickhouse node or cluster.
Package static implements connect to static Clickhouse node or cluster.
rollup
Package rollup implements rollup logic.
Package rollup implements rollup logic.
scheduler
Package scheduler implements ch-rollup scheduler.
Package scheduler implements ch-rollup scheduler.
types
Package types is a general models for ch-rollup.
Package types is a general models for ch-rollup.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL