config

package
v0.0.0-...-0afbe17 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ConfigDsn        = "dsn"
	ConfigKeyColumns = "keyColumns"
	ConfigTable      = "table"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	common.Configuration
	// Table is the configuration of the table name.
	Table string `json:"table" default:"{{ index .Metadata \"opencdc.collection\" }}"`
	// KeyColumns is the configuration of comma-separated column names to build the record key.
	KeyColumns []string `json:"keyColumns"`
}

Config is a destination configuration needed to connect to Redshift database.

func (Config) Init

func (c Config) Init() Config

Init sets lowercase "table" name if not a template.

func (Config) Parameters

func (Config) Parameters() map[string]config.Parameter

func (Config) TableFunction

func (c Config) TableFunction() (f TableFn, err error)

TableFunction returns a function that determines the table for each record individually. The function might be returning a static table name. If the table is neither static nor a template, an error is returned.

func (Config) Validate

func (c Config) Validate() error

Validate executes manual validations beyond what is defined in struct tags.

type TableFn

type TableFn func(opencdc.Record) (string, error)

Jump to

Keyboard shortcuts

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