redshift

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

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

Go to latest
Published: Aug 26, 2022 License: AGPL-3.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AWSAccessKey        = "accessKey"
	AWSAccessKeyID      = "accessKeyID"
	AWSBucketNameConfig = "bucketName"
	RSHost              = "host"
	RSPort              = "port"
	RSDbName            = "database"
	RSUserName          = "user"
	RSPassword          = "password"
)

String constants for redshift destination config

Variables

This section is empty.

Functions

func ColumnsWithDataTypes

func ColumnsWithDataTypes(columns map[string]string, prefix string) string

func Connect

func Connect(cred RedshiftCredentialsT) (*sql.DB, error)

func Init

func Init()

Types

type HandleT

type HandleT struct {
	Db             *sql.DB
	Namespace      string
	Warehouse      warehouseutils.WarehouseT
	Uploader       warehouseutils.UploaderI
	ConnectTimeout time.Duration
}

func (*HandleT) AddColumn

func (rs *HandleT) AddColumn(name, columnName, columnType string) (err error)

func (*HandleT) AlterColumn

func (rs *HandleT) AlterColumn(tableName, columnName, columnType string) (err error)

func (*HandleT) Cleanup

func (rs *HandleT) Cleanup()

func (*HandleT) Connect

func (rs *HandleT) Connect(warehouse warehouseutils.WarehouseT) (client.Client, error)

func (*HandleT) CrashRecover

func (rs *HandleT) CrashRecover(warehouse warehouseutils.WarehouseT) (err error)

func (*HandleT) CreateSchema

func (rs *HandleT) CreateSchema() (err error)

func (*HandleT) CreateTable

func (rs *HandleT) CreateTable(tableName string, columns map[string]string) (err error)

func (*HandleT) DownloadIdentityRules

func (rs *HandleT) DownloadIdentityRules(*misc.GZipWriter) (err error)

func (*HandleT) DropTable

func (rs *HandleT) DropTable(tableName string) (err error)

func (*HandleT) FetchSchema

func (rs *HandleT) FetchSchema(warehouse warehouseutils.WarehouseT) (schema warehouseutils.SchemaT, err error)

FetchSchema queries redshift and returns the schema assoiciated with provided namespace

func (*HandleT) GetTotalCountInTable

func (rs *HandleT) GetTotalCountInTable(tableName string) (total int64, err error)

func (*HandleT) IsEmpty

func (rs *HandleT) IsEmpty(warehouse warehouseutils.WarehouseT) (empty bool, err error)

func (*HandleT) LoadIdentityMappingsTable

func (rs *HandleT) LoadIdentityMappingsTable() (err error)

func (*HandleT) LoadIdentityMergeRulesTable

func (rs *HandleT) LoadIdentityMergeRulesTable() (err error)

func (*HandleT) LoadTable

func (rs *HandleT) LoadTable(tableName string) error

func (*HandleT) LoadTestTable

func (rs *HandleT) LoadTestTable(location, tableName string, payloadMap map[string]interface{}, format string) (err error)

func (*HandleT) LoadUserTables

func (rs *HandleT) LoadUserTables() map[string]error

func (*HandleT) SetConnectionTimeout

func (rs *HandleT) SetConnectionTimeout(timeout time.Duration)

func (*HandleT) Setup

func (rs *HandleT) Setup(warehouse warehouseutils.WarehouseT, uploader warehouseutils.UploaderI) (err error)

func (*HandleT) TestConnection

func (rs *HandleT) TestConnection(warehouse warehouseutils.WarehouseT) (err error)

type RedshiftCredentialsT

type RedshiftCredentialsT struct {
	Host     string
	Port     string
	DbName   string
	Username string
	Password string
	// contains filtered or unexported fields
}

RedshiftCredentialsT ...

type S3ManifestEntryMetadataT

type S3ManifestEntryMetadataT struct {
	ContentLength int64 `json:"content_length"`
}

type S3ManifestEntryT

type S3ManifestEntryT struct {
	Url       string                   `json:"url"`
	Mandatory bool                     `json:"mandatory"`
	Metadata  S3ManifestEntryMetadataT `json:"meta"`
}

type S3ManifestT

type S3ManifestT struct {
	Entries []S3ManifestEntryT `json:"entries"`
}

Jump to

Keyboard shortcuts

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