Documentation ¶
Index ¶
- Constants
- func WithConfig(h *Clickhouse, config *config.Config)
- type Clickhouse
- func (ch *Clickhouse) AddColumns(tableName string, columnsInfo []warehouseutils.ColumnInfo) (err error)
- func (*Clickhouse) AlterColumn(_, _, _ string) (model.AlterTableResponse, error)
- func (ch *Clickhouse) Cleanup()
- func (ch *Clickhouse) ColumnsWithDataTypes(tableName string, columns model.TableSchema, notNullableColumns []string) string
- func (ch *Clickhouse) Connect(warehouse model.Warehouse) (client.Client, error)
- func (*Clickhouse) CrashRecover()
- func (ch *Clickhouse) CreateSchema() (err error)
- func (ch *Clickhouse) CreateTable(tableName string, columns model.TableSchema) (err error)
- func (*Clickhouse) DeleteBy([]string, warehouseutils.DeleteByParams) error
- func (*Clickhouse) DownloadIdentityRules(*misc.GZipWriter) (err error)
- func (ch *Clickhouse) DropTable(tableName string) (err error)
- func (*Clickhouse) ErrorMappings() []model.JobError
- func (ch *Clickhouse) FetchSchema() (model.Schema, model.Schema, error)
- func (ch *Clickhouse) GetLogIdentifier(args ...string) string
- func (ch *Clickhouse) GetTotalCountInTable(ctx context.Context, tableName string) (int64, error)
- func (*Clickhouse) IsEmpty(_ model.Warehouse) (empty bool, err error)
- func (*Clickhouse) LoadIdentityMappingsTable() (err error)
- func (*Clickhouse) LoadIdentityMergeRulesTable() (err error)
- func (ch *Clickhouse) LoadTable(ctx context.Context, tableName string) error
- func (ch *Clickhouse) LoadTestTable(_, tableName string, payloadMap map[string]interface{}, _ string) (err error)
- func (ch *Clickhouse) LoadUserTables(ctx context.Context) (errorMap map[string]error)
- func (ch *Clickhouse) SetConnectionTimeout(timeout time.Duration)
- func (ch *Clickhouse) Setup(warehouse model.Warehouse, uploader warehouseutils.Uploader) (err error)
- func (ch *Clickhouse) TestConnection(ctx context.Context, _ model.Warehouse) error
- func (ch *Clickhouse) UseS3CopyEngineForLoading() bool
- type Credentials
Constants ¶
View Source
const (
Cluster = "cluster"
)
Variables ¶
This section is empty.
Functions ¶
func WithConfig ¶
func WithConfig(h *Clickhouse, config *config.Config)
Types ¶
type Clickhouse ¶
type Clickhouse struct { DB *sql.DB Namespace string ObjectStorage string Warehouse model.Warehouse Uploader warehouseutils.Uploader ConnectTimeout time.Duration Logger logger.Logger QueryDebugLogs string BlockSize string PoolSize string ReadTimeout string WriteTimeout string Compress bool DisableNullable bool ExecTimeOutInSeconds time.Duration CommitTimeOutInSeconds time.Duration LoadTableFailureRetries int NumWorkersDownloadLoadFiles int S3EngineEnabledWorkspaceIDs []string LoadFileDownloader downloader.Downloader // contains filtered or unexported fields }
func New ¶ added in v1.8.0
func New() *Clickhouse
func (*Clickhouse) AddColumns ¶
func (ch *Clickhouse) AddColumns(tableName string, columnsInfo []warehouseutils.ColumnInfo) (err error)
func (*Clickhouse) AlterColumn ¶
func (*Clickhouse) AlterColumn(_, _, _ string) (model.AlterTableResponse, error)
func (*Clickhouse) Cleanup ¶
func (ch *Clickhouse) Cleanup()
func (*Clickhouse) ColumnsWithDataTypes ¶
func (ch *Clickhouse) ColumnsWithDataTypes(tableName string, columns model.TableSchema, notNullableColumns []string) string
ColumnsWithDataTypes creates columns and its datatype into sql format for creating table
func (*Clickhouse) CrashRecover ¶
func (*Clickhouse) CrashRecover()
func (*Clickhouse) CreateSchema ¶
func (ch *Clickhouse) CreateSchema() (err error)
func (*Clickhouse) CreateTable ¶
func (ch *Clickhouse) CreateTable(tableName string, columns model.TableSchema) (err error)
CreateTable creates table with engine ReplacingMergeTree(), this is used for dedupe event data and replace it will the latest data if duplicate data found. This logic is handled by clickhouse The engine differs from MergeTree in that it removes duplicate entries with the same sorting key value.
func (*Clickhouse) DeleteBy ¶
func (*Clickhouse) DeleteBy([]string, warehouseutils.DeleteByParams) error
func (*Clickhouse) DownloadIdentityRules ¶
func (*Clickhouse) DownloadIdentityRules(*misc.GZipWriter) (err error)
func (*Clickhouse) DropTable ¶
func (ch *Clickhouse) DropTable(tableName string) (err error)
func (*Clickhouse) ErrorMappings ¶
func (*Clickhouse) ErrorMappings() []model.JobError
func (*Clickhouse) FetchSchema ¶
FetchSchema queries clickhouse and returns the schema associated with provided namespace
func (*Clickhouse) GetLogIdentifier ¶
func (ch *Clickhouse) GetLogIdentifier(args ...string) string
func (*Clickhouse) GetTotalCountInTable ¶
func (*Clickhouse) LoadIdentityMappingsTable ¶
func (*Clickhouse) LoadIdentityMappingsTable() (err error)
func (*Clickhouse) LoadIdentityMergeRulesTable ¶
func (*Clickhouse) LoadIdentityMergeRulesTable() (err error)
func (*Clickhouse) LoadTable ¶
func (ch *Clickhouse) LoadTable(ctx context.Context, tableName string) error
func (*Clickhouse) LoadTestTable ¶
func (ch *Clickhouse) LoadTestTable(_, tableName string, payloadMap map[string]interface{}, _ string) (err error)
func (*Clickhouse) LoadUserTables ¶
func (ch *Clickhouse) LoadUserTables(ctx context.Context) (errorMap map[string]error)
func (*Clickhouse) SetConnectionTimeout ¶
func (ch *Clickhouse) SetConnectionTimeout(timeout time.Duration)
func (*Clickhouse) Setup ¶
func (ch *Clickhouse) Setup(warehouse model.Warehouse, uploader warehouseutils.Uploader) (err error)
func (*Clickhouse) TestConnection ¶
TestConnection is used destination connection tester to test the clickhouse connection
func (*Clickhouse) UseS3CopyEngineForLoading ¶
func (ch *Clickhouse) UseS3CopyEngineForLoading() bool
Click to show internal directories.
Click to hide internal directories.