transformer

package
v1.0.0-beta.4 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2021 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TempTablePrimary       = "kafkaoffset"
	TempTablePrimaryType   = "character varying(max)"
	TempTableOp            = "debeziumop"
	TempTableOpType        = "character varying(6)"
	LengthColumnSuffix     = "_length"
	MobileCoulmnSuffix     = "_init5"
	MappingPIIColumnPrefix = "hashed_"
)

Variables

This section is empty.

Functions

func ParseTopic

func ParseTopic(topic string) (string, string, string)

ParseTopic breaks down the topic string into server, database, table

Types

type MessageTransformer

type MessageTransformer interface {
	Transform(message *serializer.Message, table redshift.Table) error
}

type SchemaTransformer

type SchemaTransformer interface {
	// PrimaryKeys returns the list of primary keys for the schema
	PrimaryKeys(schemaID int) ([]string, error)
	// Transform value transforms the schemaId for various use cases.
	// it uses maskSchema to change the type of the schema datatypes if required
	TransformValue(
		topic string,
		schemaId int,
		schemaIdKey int,
		maskSchema map[string]serializer.MaskInfo,
		extraMaskSchema map[string]serializer.ExtraMaskInfo,
	) (interface{}, error)

	// Deprecated:
	// TransformKey transforms the topic schema into name of the primary
	// key and its type.
	TransformKey(topic string) ([]string, error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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