destination

package
v0.10.1 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2024 License: Apache-2.0 Imports: 7 Imported by: 1

Documentation

Index

Constants

View Source
const (
	ConfigKey   = "key"
	ConfigTable = "table"
	ConfigUrl   = "url"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config added in v0.6.0

type Config struct {
	// URL is the connection string for the Postgres database.
	URL string `json:"url" validate:"required"`
	// Table is used as the target table into which records are inserted.
	Table string `json:"table" default:"{{ index .Metadata \"opencdc.collection\" }}"`
	// Key represents the column name for the key used to identify and update existing rows.
	Key string `json:"key"`
}

func (Config) Parameters added in v0.6.0

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

func (Config) TableFunction added in v0.7.0

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.

type TableFn added in v0.7.0

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