clickhouse

package
v0.0.0-rc7 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2024 License: Apache-2.0 Imports: 20 Imported by: 0

README

Clickhouse transformer

Based on Clickhouse Local

This tool accept clickhouse SQL dialect and allow to produce SQL-like in memory data transformation.

diagram

Source table inside CH Local named as table, clickhouse table structure mimic source table structure.

Since each source change item (row) contains extra metadata we must match source and target data together. There for each row must have a key defined. All of this key should be uniq in every batch (for this we call collapse function). If we can't match source keys with transformed data we will mark such row as errored.

Documentation

Index

Constants

View Source
const Type = abstract.TransformerType("sql")

Variables

This section is empty.

Functions

This section is empty.

Types

type ClickhouseTransformer

type ClickhouseTransformer struct {
	// contains filtered or unexported fields
}

func New

func New(config Config, lgr log.Logger) (*ClickhouseTransformer, error)

func (*ClickhouseTransformer) Apply

func (*ClickhouseTransformer) Description

func (s *ClickhouseTransformer) Description() string

func (*ClickhouseTransformer) ResultSchema

func (s *ClickhouseTransformer) ResultSchema(schema *abstract.TableSchema) (*abstract.TableSchema, error)

func (*ClickhouseTransformer) Suitable

func (s *ClickhouseTransformer) Suitable(table abstract.TableID, schema *abstract.TableSchema) bool

func (*ClickhouseTransformer) Type

type Config

type Config struct {
	Tables filter.Tables `json:"tables"`
	Query  string        `json:"query"`
}

Jump to

Keyboard shortcuts

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