Documentation ¶
Index ¶
- Constants
- type Clickhouse
- func (ch *Clickhouse) AddColumns(ctx context.Context, tableName string, columnsInfo []warehouseutils.ColumnInfo) (err error)
- func (*Clickhouse) AlterColumn(context.Context, string, string, string) (model.AlterTableResponse, error)
- func (ch *Clickhouse) Cleanup(context.Context)
- func (ch *Clickhouse) ColumnsWithDataTypes(tableName string, columns model.TableSchema, notNullableColumns []string) string
- func (ch *Clickhouse) Connect(_ context.Context, warehouse model.Warehouse) (client.Client, error)
- func (*Clickhouse) CrashRecover(context.Context)
- func (ch *Clickhouse) CreateSchema(ctx context.Context) (err error)
- func (ch *Clickhouse) CreateTable(ctx context.Context, tableName string, columns model.TableSchema) (err error)
- func (*Clickhouse) DeleteBy(context.Context, []string, warehouseutils.DeleteByParams) error
- func (*Clickhouse) DownloadIdentityRules(context.Context, *misc.GZipWriter) (err error)
- func (ch *Clickhouse) DropTable(ctx context.Context, tableName string) (err error)
- func (*Clickhouse) ErrorMappings() []model.JobError
- func (ch *Clickhouse) FetchSchema(ctx context.Context) (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(context.Context, model.Warehouse) (empty bool, err error)
- func (*Clickhouse) LoadIdentityMappingsTable(context.Context) (err error)
- func (*Clickhouse) LoadIdentityMergeRulesTable(context.Context) (err error)
- func (ch *Clickhouse) LoadTable(ctx context.Context, tableName string) error
- func (ch *Clickhouse) LoadTestTable(ctx context.Context, _, tableName string, payloadMap map[string]interface{}, ...) (err error)
- func (ch *Clickhouse) LoadUserTables(ctx context.Context) (errorMap map[string]error)
- func (ch *Clickhouse) SetConnectionTimeout(timeout time.Duration)
- func (ch *Clickhouse) Setup(_ context.Context, warehouse model.Warehouse, uploader warehouseutils.Uploader) (err error)
- func (ch *Clickhouse) TestConnection(ctx context.Context, _ model.Warehouse) error
- func (ch *Clickhouse) UseS3CopyEngineForLoading() bool
Constants ¶
View Source
const (
Cluster = "cluster"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Clickhouse ¶
type Clickhouse struct { DB *sql.DB Namespace string ObjectStorage string Warehouse model.Warehouse Uploader warehouseutils.Uploader LoadFileDownloader downloader.Downloader // contains filtered or unexported fields }
func (*Clickhouse) AddColumns ¶
func (ch *Clickhouse) AddColumns(ctx context.Context, tableName string, columnsInfo []warehouseutils.ColumnInfo) (err error)
func (*Clickhouse) AlterColumn ¶
func (*Clickhouse) AlterColumn(context.Context, string, string, string) (model.AlterTableResponse, error)
func (*Clickhouse) Cleanup ¶
func (ch *Clickhouse) Cleanup(context.Context)
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(context.Context)
func (*Clickhouse) CreateSchema ¶
func (ch *Clickhouse) CreateSchema(ctx context.Context) (err error)
func (*Clickhouse) CreateTable ¶
func (ch *Clickhouse) CreateTable(ctx context.Context, 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(context.Context, []string, warehouseutils.DeleteByParams) error
func (*Clickhouse) DownloadIdentityRules ¶
func (*Clickhouse) DownloadIdentityRules(context.Context, *misc.GZipWriter) (err error)
func (*Clickhouse) DropTable ¶
func (ch *Clickhouse) DropTable(ctx context.Context, 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(context.Context) (err error)
func (*Clickhouse) LoadIdentityMergeRulesTable ¶
func (*Clickhouse) LoadIdentityMergeRulesTable(context.Context) (err error)
func (*Clickhouse) LoadTable ¶
func (ch *Clickhouse) LoadTable(ctx context.Context, tableName string) error
func (*Clickhouse) LoadTestTable ¶
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(_ context.Context, 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.