athena

package
v0.11.23 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewColumnCheckOperator

func NewColumnCheckOperator(manager connectionFetcher) *ansisql.ColumnCheckOperator

Types

type AcceptedValuesCheck

type AcceptedValuesCheck struct {
	// contains filtered or unexported fields
}

func (*AcceptedValuesCheck) Check

type BasicOperator

type BasicOperator struct {
	// contains filtered or unexported fields
}

func NewBasicOperator

func NewBasicOperator(conn connectionFetcher, extractor queryExtractor, materializer materializer) *BasicOperator

func (BasicOperator) Run

func (BasicOperator) RunTask

type Client

type Client interface {
	RunQueryWithoutResult(ctx context.Context, query *query.Query) error
	Select(ctx context.Context, query *query.Query) ([][]interface{}, error)
	GetResultsLocation() string
}

type Config

type Config struct {
	OutputBucket    string
	Region          string
	AccessID        string
	SecretAccessKey string
	Database        string
}

func (*Config) ToDBConnectionURI

func (c *Config) ToDBConnectionURI() string

type DB

type DB struct {
	// contains filtered or unexported fields
}

func NewDB

func NewDB(c *Config) *DB

func (*DB) GetResultsLocation

func (db *DB) GetResultsLocation() string

func (*DB) RunQueryWithoutResult

func (db *DB) RunQueryWithoutResult(ctx context.Context, query *query.Query) error

func (*DB) Select

func (db *DB) Select(ctx context.Context, query *query.Query) ([][]interface{}, error)

type Materializer

type Materializer struct {
	MaterializationMap AssetMaterializationMap
	// contains filtered or unexported fields
}

The other packages all use a materializer that renders the query to a single string. Due to the quirks of athena we need to create a different materializer that returns a slice of strings, since athena server requires us to send separate batches for certain things.

func NewMaterializer

func NewMaterializer(fullRefresh bool) *Materializer

func (*Materializer) Render

func (m *Materializer) Render(asset *pipeline.Asset, query, location string) ([]string, error)

type MaterializerFunc

type MaterializerFunc func(task *pipeline.Asset, query, location string) ([]string, error)

type PatternCheck

type PatternCheck struct {
	// contains filtered or unexported fields
}

func (*PatternCheck) Check

type QuerySensor

type QuerySensor struct {
	// contains filtered or unexported fields
}

func NewQuerySensor

func NewQuerySensor(conn connectionFetcher, renderer renderer, secondsToSleep int64) *QuerySensor

func (*QuerySensor) Run

func (*QuerySensor) RunTask

func (o *QuerySensor) RunTask(ctx context.Context, p *pipeline.Pipeline, t *pipeline.Asset) error

type Renderer

type Renderer struct {
	// contains filtered or unexported fields
}

func NewRenderer

func NewRenderer(fullRefresh bool, location string) *Renderer

func (*Renderer) Render

func (r *Renderer) Render(asset *pipeline.Asset, query string) (string, error)

Jump to

Keyboard shortcuts

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