cmd

package
v0.11.232 Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2025 License: Apache-2.0 Imports: 70 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultTemplate   = "default"
	DefaultFolderName = "bruin-pipeline"
)
View Source
const LogsFolder = "logs"

Variables

View Source
var (
	DefaultGlossaryReader = &glossary.GlossaryReader{
		RepoFinder: &git.RepoFinder{},
		FileNames:  []string{"glossary.yml", "glossary.yaml"},
	}

	DefaultPipelineBuilder = pipeline.NewBuilder(builderConfig, pipeline.CreateTaskFromYamlDefinition(fs), pipeline.CreateTaskFromFileComments(fs), fs, DefaultGlossaryReader)
)
View Source
var PipelineDefinitionFiles = []string{"pipeline.yml", "pipeline.yaml"}

Functions

func AddConnection added in v0.11.22

func AddConnection() *cli.Command

func ApplyAllFilters added in v0.11.169

func ApplyAllFilters(ctx context.Context, f *Filter, s *scheduler.Scheduler, p *pipeline.Pipeline) error

func CheckLint added in v0.11.123

func CheckLint(ctx context.Context, foundPipeline *pipeline.Pipeline, pipelinePath string, logger logger.Logger, parser *sqlparser.SQLParser, connectionManager *connection.Manager) error

func Clean

func Clean(str string) string

func CleanCmd added in v0.1.3

func CleanCmd() *cli.Command

func ConnectionSchemas added in v0.11.55

func ConnectionSchemas() *cli.Command

func Connections added in v0.11.22

func Connections() *cli.Command

func DataDiffCmd added in v0.11.224

func DataDiffCmd() *cli.Command

DataDiffCmd defines the 'data-diff' command.

func DeleteConnection added in v0.11.22

func DeleteConnection() *cli.Command

func Docs added in v0.11.107

func Docs() *cli.Command

func Environments added in v0.11.4

func Environments(isDebug *bool) *cli.Command

func FilterTaskTypes added in v0.11.169

func FilterTaskTypes(ctx context.Context, f *Filter, s *scheduler.Scheduler, p *pipeline.Pipeline) error

func Format added in v0.11.27

func Format(isDebug *bool) *cli.Command

func GetPipelineAndAsset added in v0.11.143

func GetPipelineAndAsset(ctx context.Context, inputPath string, fs afero.Fs, configFilePath string) (*ppInfo, error)

func HandleExcludeTags added in v0.11.169

func HandleExcludeTags(ctx context.Context, f *Filter, s *scheduler.Scheduler, p *pipeline.Pipeline) error

func HandleIncludeTags added in v0.11.169

func HandleIncludeTags(ctx context.Context, f *Filter, s *scheduler.Scheduler, p *pipeline.Pipeline) error

func HandleSingleTask added in v0.11.169

func HandleSingleTask(ctx context.Context, f *Filter, s *scheduler.Scheduler, p *pipeline.Pipeline) error

func Init added in v0.6.6

func Init() *cli.Command

func Internal added in v0.10.1

func Internal() *cli.Command

func Lineage

func Lineage() *cli.Command

func Lint

func Lint(isDebug *bool) *cli.Command

func ListConnections added in v0.11.22

func ListConnections() *cli.Command

func ListEnvironments added in v0.11.4

func ListEnvironments(isDebug *bool) *cli.Command

func NewRunID added in v0.11.227

func NewRunID() string

func ParseAsset added in v0.10.1

func ParseAsset() *cli.Command

func ParseDate added in v0.11.123

func ParseDate(startDateStr, endDateStr string, logger logger.Logger) (time.Time, time.Time, error)

func ParsePipeline added in v0.11.16

func ParsePipeline() *cli.Command

func Patch added in v0.11.216

func Patch() *cli.Command

func PatchAsset added in v0.11.27

func PatchAsset() *cli.Command

func PingConnection added in v0.11.106

func PingConnection() *cli.Command

func Query added in v0.11.111

func Query() *cli.Command

func ReadState added in v0.11.123

func ReadState(fs afero.Fs, statePath string, filter *Filter) (*scheduler.PipelineState, error)

func RecoverFromPanic added in v0.5.1

func RecoverFromPanic()

func Render

func Render() *cli.Command

func Run

func Run(isDebug *bool) *cli.Command

func SetupExecutors added in v0.11.216

func SetupExecutors(
	s *scheduler.Scheduler,
	config *config.Config,
	conn *connection.Manager,
	startDate,
	endDate time.Time,
	pipelineName string,
	runID string,
	fullRefresh bool,
	usePipForPython bool,
	sensorMode string,
	renderer *jinja.Renderer,
	parser *sqlparser.SQLParser,
) (map[pipeline.AssetType]executor.Config, error)

func SkipAllTasksIfSingleCheck added in v0.11.192

func SkipAllTasksIfSingleCheck(ctx context.Context, f *Filter, s *scheduler.Scheduler, p *pipeline.Pipeline) error

func ValidateRunConfig added in v0.11.123

func ValidateRunConfig(runConfig *scheduler.RunConfig, inputPath string, logger logger.Logger) (time.Time, time.Time, string, error)

func VersionCmd added in v0.11.66

func VersionCmd(commit string) *cli.Command

Types

type CleanCommand added in v0.1.3

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

func (*CleanCommand) Run added in v0.1.3

func (r *CleanCommand) Run(inputPath string) error

type ConnectionsCommand added in v0.11.22

type ConnectionsCommand struct{}

func (*ConnectionsCommand) ListConnections added in v0.11.22

func (r *ConnectionsCommand) ListConnections(pathToProject, output, environment, configFilePath string) error

type EnvironmentListCommand added in v0.11.4

type EnvironmentListCommand struct{}

func (*EnvironmentListCommand) Run added in v0.11.4

func (r *EnvironmentListCommand) Run(output, configFilePath string) error

type ErrorResponse added in v0.11.47

type ErrorResponse struct {
	Error string `json:"error"`
}

type ErrorResponses added in v0.11.47

type ErrorResponses struct {
	Error []string `json:"error"`
}

type Filter added in v0.11.113

type Filter struct {
	IncludeTag        string   // Tag to include assets (from `--tag`)
	OnlyTaskTypes     []string // Task types to include (from `--only`)
	IncludeDownstream bool     // Whether to include downstream tasks (from `--downstream`)
	PushMetaData      bool
	SingleTask        *pipeline.Asset
	ExcludeTag        string
	// contains filtered or unexported fields
}

type FilterMutator added in v0.11.169

type FilterMutator func(ctx context.Context, f *Filter, s *scheduler.Scheduler, p *pipeline.Pipeline) error

type Limiter added in v0.11.144

type Limiter interface {
	Limit(query string, limit int64) string
}

type LineageCommand

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

func (*LineageCommand) Run

func (r *LineageCommand) Run(ctx context.Context, assetPath string, fullLineage bool, output string) error

type ModifierInfo added in v0.11.197

type ModifierInfo struct {
	StartDate      time.Time
	EndDate        time.Time
	ApplyModifiers bool
}

type ParseCommand added in v0.10.1

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

func (*ParseCommand) ParsePipeline added in v0.11.16

func (r *ParseCommand) ParsePipeline(ctx context.Context, assetPath string, lineage bool, slimResponse bool) error

func (*ParseCommand) Run added in v0.10.1

func (r *ParseCommand) Run(ctx context.Context, assetPath string, lineage bool) error

type PipelineInfo added in v0.11.123

type PipelineInfo struct {
	Pipeline           *pipeline.Pipeline
	RunningForAnAsset  bool
	RunDownstreamTasks bool
}

func GetPipeline added in v0.11.123

func GetPipeline(ctx context.Context, inputPath string, runConfig *scheduler.RunConfig, log logger.Logger, opts ...pipeline.CreatePipelineOption) (*PipelineInfo, error)

type RenderCommand

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

func (*RenderCommand) Run

func (r *RenderCommand) Run(pl *pipeline.Pipeline, task *pipeline.Asset, modifierInfo ModifierInfo) error

type TableComparer added in v0.11.224

type TableComparer interface {
	CompareTables(ctx context.Context, table1, table2 string) (*diff.SchemaComparisonResult, error)
}

TableComparer defines an interface for connections that can compare tables.

type VersionInfo added in v0.11.112

type VersionInfo struct {
	Version string `json:"version"`
	Commit  string `json:"commit"`
	Latest  string `json:"latest"`
}

Jump to

Keyboard shortcuts

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