pipeline

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2023 License: Apache-2.0 Imports: 9 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewBuilder

func NewBuilder(config BuilderConfig, yamlTaskCreator TaskCreator, commentTaskCreator TaskCreator, fs afero.Fs) *builder

Types

type Asset added in v0.9.0

type Asset struct {
	Name            string
	Description     string
	Type            AssetType
	ExecutableFile  ExecutableFile
	DefinitionFile  TaskDefinitionFile
	Parameters      map[string]string
	Connection      string
	DependsOn       []string
	Schedule        TaskSchedule
	Materialization Materialization
	Columns         map[string]Column

	Pipeline *Pipeline
	// contains filtered or unexported fields
}

func ConvertYamlToTask

func ConvertYamlToTask(content []byte) (*Asset, error)

func (*Asset) AddDownstream added in v0.11.0

func (a *Asset) AddDownstream(asset *Asset)

func (*Asset) AddUpstream added in v0.11.0

func (a *Asset) AddUpstream(asset *Asset)

func (*Asset) GetDownstream added in v0.11.0

func (a *Asset) GetDownstream() []*Asset

func (*Asset) GetFullDownstream added in v0.11.0

func (a *Asset) GetFullDownstream() []*Asset

func (*Asset) GetFullUpstream added in v0.11.0

func (a *Asset) GetFullUpstream() []*Asset

func (*Asset) GetUpstream added in v0.11.0

func (a *Asset) GetUpstream() []*Asset

type AssetType added in v0.9.0

type AssetType string

type BuilderConfig

type BuilderConfig struct {
	PipelineFileName    string
	TasksDirectoryName  string
	TasksDirectoryNames []string
	TasksFileSuffixes   []string
}

type Column added in v0.9.0

type Column struct {
	Name        string
	Description string        `yaml:"description"`
	Checks      []ColumnCheck `yaml:"checks"`
}

type ColumnCheck added in v0.9.0

type ColumnCheck struct {
	Name  string `yaml:"name"`
	Value ColumnCheckValue
}

type ColumnCheckValue added in v0.9.0

type ColumnCheckValue struct {
	IntArray    *[]int
	Int         *int
	Float       *float64
	StringArray *[]string
	String      *string
}

type DefinitionFile

type DefinitionFile struct {
	Name string
	Path string
}

type ExecutableFile

type ExecutableFile struct {
	Name    string
	Path    string
	Content string
}

type Materialization

type Materialization struct {
	Type           MaterializationType
	Strategy       MaterializationStrategy
	PartitionBy    string
	ClusterBy      []string
	IncrementalKey string
}

type MaterializationStrategy

type MaterializationStrategy string
const (
	MaterializationStrategyNone          MaterializationStrategy = ""
	MaterializationStrategyCreateReplace MaterializationStrategy = "create+replace"
	MaterializationStrategyDeleteInsert  MaterializationStrategy = "delete+insert"
	MaterializationStrategyAppend        MaterializationStrategy = "append"
)

type MaterializationType

type MaterializationType string
const (
	MaterializationTypeNone  MaterializationType = ""
	MaterializationTypeView  MaterializationType = "view"
	MaterializationTypeTable MaterializationType = "table"
)

type Notifications

type Notifications struct {
	Slack []SlackNotification
}

type Pipeline

type Pipeline struct {
	LegacyID           string   `yaml:"id"`
	Name               string   `yaml:"name"`
	Schedule           schedule `yaml:"schedule"`
	StartDate          string   `yaml:"start_date"`
	DefinitionFile     DefinitionFile
	DefaultParameters  map[string]string `yaml:"default_parameters"`
	DefaultConnections map[string]string `yaml:"default_connections"`
	Tasks              []*Asset
	Notifications      Notifications `yaml:"notifications"`

	TasksByType map[AssetType][]*Asset
	// contains filtered or unexported fields
}

func (*Pipeline) GetAssetByPath added in v0.11.0

func (p *Pipeline) GetAssetByPath(assetPath string) *Asset

func (*Pipeline) GetConnectionNameForAsset added in v0.10.0

func (p *Pipeline) GetConnectionNameForAsset(asset *Asset) string

func (Pipeline) HasAssetType added in v0.11.0

func (p Pipeline) HasAssetType(taskType AssetType) bool

func (*Pipeline) RelativeAssetPath added in v0.11.0

func (p *Pipeline) RelativeAssetPath(t *Asset) string

type SlackNotification

type SlackNotification struct {
	Name       string
	Connection string
	Success    string
	Failure    string
}

type TaskCreator

type TaskCreator func(path string) (*Asset, error)

func CreateTaskFromFileComments

func CreateTaskFromFileComments(fs afero.Fs) TaskCreator

func CreateTaskFromYamlDefinition

func CreateTaskFromYamlDefinition(fs afero.Fs) TaskCreator

type TaskDefinitionFile

type TaskDefinitionFile struct {
	Name string
	Path string
	Type TaskDefinitionType
}

type TaskDefinitionType

type TaskDefinitionType string
const (
	CommentTask TaskDefinitionType = "comment"
	YamlTask    TaskDefinitionType = "yaml"
)

type TaskSchedule

type TaskSchedule struct {
	Days []string
}

Jump to

Keyboard shortcuts

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