Documentation
¶
Index ¶
- Variables
- func CallFuncForEveryAsset(callable AssetValidator) func(ctx context.Context, pipeline *pipeline.Pipeline) ([]*Issue, error)
- func ContainsTag(tags []string, target string) bool
- func EnsureNoNestedPipelines(pipelinePaths []string) error
- func QueryColumnsMatchColumnsPolicy(parser *sqlparser.SQLParser) ...
- type AssetValidator
- type CrossPipelineValidator
- type GlossaryChecker
- type Issue
- func EnsureAssetTierIsValidForASingleAsset(ctx context.Context, p *pipeline.Pipeline, asset *pipeline.Asset) ([]*Issue, error)
- func EnsureBigQueryQuerySensorHasQueryParameterForASingleAsset(ctx context.Context, p *pipeline.Pipeline, asset *pipeline.Asset) ([]*Issue, error)
- func EnsureDependencyExistsForASingleAsset(ctx context.Context, p *pipeline.Pipeline, task *pipeline.Asset) ([]*Issue, error)
- func EnsureIngestrAssetIsValidForASingleAsset(ctx context.Context, p *pipeline.Pipeline, asset *pipeline.Asset) ([]*Issue, error)
- func EnsureMSTeamsFieldInPipelineIsValid(ctx context.Context, p *pipeline.Pipeline) ([]*Issue, error)
- func EnsureMaterializationValuesAreValidForSingleAsset(ctx context.Context, p *pipeline.Pipeline, asset *pipeline.Asset) ([]*Issue, error)
- func EnsurePipelineConcurrencyIsValid(ctx context.Context, p *pipeline.Pipeline) ([]*Issue, error)
- func EnsurePipelineHasNoCycles(ctx context.Context, p *pipeline.Pipeline) ([]*Issue, error)
- func EnsurePipelineNameIsValid(ctx context.Context, pipeline *pipeline.Pipeline) ([]*Issue, error)
- func EnsurePipelineScheduleIsValidCron(ctx context.Context, p *pipeline.Pipeline) ([]*Issue, error)
- func EnsurePipelineStartDateIsValid(ctx context.Context, p *pipeline.Pipeline) ([]*Issue, error)
- func EnsureSecretMappingsHaveKeyForASingleAsset(ctx context.Context, p *pipeline.Pipeline, asset *pipeline.Asset) ([]*Issue, error)
- func EnsureSlackFieldInPipelineIsValid(ctx context.Context, p *pipeline.Pipeline) ([]*Issue, error)
- func EnsureSnowflakeSensorHasQueryParameterForASingleAsset(ctx context.Context, p *pipeline.Pipeline, asset *pipeline.Asset) ([]*Issue, error)
- func EnsureTaskNameIsUnique(ctx context.Context, p *pipeline.Pipeline) ([]*Issue, error)
- func EnsureTaskNameIsUniqueForASingleAsset(ctx context.Context, p *pipeline.Pipeline, asset *pipeline.Asset) ([]*Issue, error)
- func EnsureTaskNameIsValidForASingleAsset(ctx context.Context, p *pipeline.Pipeline, asset *pipeline.Asset) ([]*Issue, error)
- func EnsureTimeIntervalIsValidForAsset(ctx context.Context, p *pipeline.Pipeline, asset *pipeline.Asset) ([]*Issue, error)
- func EnsureTypeIsCorrectForASingleAsset(ctx context.Context, p *pipeline.Pipeline, asset *pipeline.Asset) ([]*Issue, error)
- func ValidateAssetDirectoryExist(ctx context.Context, p *pipeline.Pipeline) ([]*Issue, error)
- func ValidateAssetSeedValidation(ctx context.Context, p *pipeline.Pipeline, asset *pipeline.Asset) ([]*Issue, error)
- func ValidateCrossPipelineURIDependencies(ctx context.Context, pipelines []*pipeline.Pipeline) ([]*Issue, error)
- func ValidateCustomCheckQueryExists(ctx context.Context, p *pipeline.Pipeline, asset *pipeline.Asset) ([]*Issue, error)
- func ValidateDuplicateColumnNames(ctx context.Context, p *pipeline.Pipeline, asset *pipeline.Asset) ([]*Issue, error)
- func ValidateDuplicateTags(ctx context.Context, p *pipeline.Pipeline, asset *pipeline.Asset) ([]*Issue, error)
- func ValidateEMRServerlessAsset(ctx context.Context, p *pipeline.Pipeline, asset *pipeline.Asset) ([]*Issue, error)
- func ValidatePythonAssetMaterialization(ctx context.Context, p *pipeline.Pipeline, asset *pipeline.Asset) ([]*Issue, error)
- func ValidateTableSensorTableParameter(ctx context.Context, p *pipeline.Pipeline, asset *pipeline.Asset) ([]*Issue, error)
- func ValidateVariables(ctx context.Context, p *pipeline.Pipeline) ([]*Issue, error)
- type Level
- type Linter
- func (l *Linter) Lint(ctx context.Context, rootPath string, pipelineDefinitionFileName []string, ...) (*PipelineAnalysisResult, error)
- func (l *Linter) LintAsset(ctx context.Context, rootPath string, pipelineDefinitionFileName []string, ...) (*PipelineAnalysisResult, error)
- func (l *Linter) LintPipeline(ctx context.Context, p *pipeline.Pipeline) (*PipelineIssues, error)
- func (l *Linter) LintPipelines(ctx context.Context, pipelines []*pipeline.Pipeline) (*PipelineAnalysisResult, error)
- type PipelineAnalysisResult
- type PipelineIssues
- type PipelineValidator
- type PolicySpecification
- type Printer
- type QueryValidatorRule
- func (q *QueryValidatorRule) GetApplicableLevels() []Level
- func (q *QueryValidatorRule) GetSeverity() ValidatorSeverity
- func (q *QueryValidatorRule) IsFast() bool
- func (q *QueryValidatorRule) Name() string
- func (q *QueryValidatorRule) Validate(ctx context.Context, p *pipeline.Pipeline) ([]*Issue, error)
- func (q *QueryValidatorRule) ValidateAsset(ctx context.Context, p *pipeline.Pipeline, asset *pipeline.Asset) ([]*Issue, error)
- func (q *QueryValidatorRule) ValidateCrossPipeline(ctx context.Context, pipelines []*pipeline.Pipeline) ([]*Issue, error)
- type Rule
- type RuleDefinition
- type RuleSet
- type RuleTarget
- type SimpleRule
- func (g *SimpleRule) GetApplicableLevels() []Level
- func (g *SimpleRule) GetSeverity() ValidatorSeverity
- func (g *SimpleRule) IsFast() bool
- func (g *SimpleRule) Name() string
- func (g *SimpleRule) Validate(ctx context.Context, pipeline *pipeline.Pipeline) ([]*Issue, error)
- func (g *SimpleRule) ValidateAsset(ctx context.Context, pipeline *pipeline.Pipeline, asset *pipeline.Asset) ([]*Issue, error)
- func (g *SimpleRule) ValidateCrossPipeline(ctx context.Context, pipelines []*pipeline.Pipeline) ([]*Issue, error)
- type TableNameValidationRule
- type UsedTableValidatorRule
- func (u UsedTableValidatorRule) GetApplicableLevels() []Level
- func (u UsedTableValidatorRule) GetSeverity() ValidatorSeverity
- func (u UsedTableValidatorRule) IsFast() bool
- func (u UsedTableValidatorRule) Name() string
- func (u UsedTableValidatorRule) Validate(ctx context.Context, p *pipeline.Pipeline) ([]*Issue, error)
- func (u UsedTableValidatorRule) ValidateAsset(ctx context.Context, p *pipeline.Pipeline, asset *pipeline.Asset) ([]*Issue, error)
- func (u UsedTableValidatorRule) ValidateCrossPipeline(ctx context.Context, pipelines []*pipeline.Pipeline) ([]*Issue, error)
- type ValidatorSeverity
- type WarnRegularYamlFiles
Constants ¶
This section is empty.
Variables ¶
var ( RuleTargetAsset = RuleTarget("asset") RuleTargetPipeline = RuleTarget("pipeline") )
var TableSensorAllowedAssetTypes = map[pipeline.AssetType]bool{ pipeline.AssetTypeBigqueryTableSensor: true, pipeline.AssetTypeSnowflakeTableSensor: true, pipeline.AssetTypeAthenaTableSensor: true, pipeline.AssetTypeRedshiftTableSensor: true, pipeline.AssetTypeDatabricksTableSensor: true, pipeline.AssetTypeClickHouseTableSensor: true, pipeline.AssetTypeMsSQLTableSensor: true, pipeline.AssetTypePostgresTableSensor: true, pipeline.AssetTypeSynapseTableSensor: true, }
Functions ¶
func CallFuncForEveryAsset ¶ added in v0.6.6
func ContainsTag ¶ added in v0.11.239
func EnsureNoNestedPipelines ¶ added in v0.4.1
Types ¶
type AssetValidator ¶ added in v0.5.6
type AssetValidator func(ctx context.Context, pipeline *pipeline.Pipeline, asset *pipeline.Asset) ([]*Issue, error)
func EnsureExecutableFileIsValidForASingleAsset ¶ added in v0.5.6
func EnsureExecutableFileIsValidForASingleAsset(fs afero.Fs) AssetValidator
func ValidateCustomCheckQueryDryRun ¶ added in v0.11.222
func ValidateCustomCheckQueryDryRun(connections connectionManager, renderer jinja.RendererInterface) AssetValidator
ValidateCustomCheckQueryDryRun validates CustomCheck.Query using a dry-run against the DB.
type CrossPipelineValidator ¶ added in v0.11.280
type GlossaryChecker ¶ added in v0.11.9
type GlossaryChecker struct {
// contains filtered or unexported fields
}
func (*GlossaryChecker) EnsureAssetEntitiesExistInGlossary ¶ added in v0.11.9
func (*GlossaryChecker) EnsureParentDomainsExistInGlossary ¶ added in v0.11.278
type Issue ¶
func EnsureAssetTierIsValidForASingleAsset ¶ added in v0.11.250
func EnsureBigQueryQuerySensorHasQueryParameterForASingleAsset ¶ added in v0.11.296
func EnsureDependencyExistsForASingleAsset ¶ added in v0.5.6
func EnsureIngestrAssetIsValidForASingleAsset ¶ added in v0.6.6
func EnsureMSTeamsFieldInPipelineIsValid ¶ added in v0.11.20
func EnsureMaterializationValuesAreValidForSingleAsset ¶ added in v0.5.6
func EnsurePipelineConcurrencyIsValid ¶ added in v0.11.243
func EnsurePipelineHasNoCycles ¶
EnsurePipelineHasNoCycles ensures that the pipeline is a DAG, and contains no cycles. Since the pipelines are directed graphs, strongly connected components mean cycles, therefore they would be considered invalid for our pipelines. Strong connectivity wouldn't work for tasks that depend on themselves, therefore there's a specific check for that.
func EnsurePipelineStartDateIsValid ¶ added in v0.11.8
func EnsureSecretMappingsHaveKeyForASingleAsset ¶ added in v0.11.271
func EnsureSnowflakeSensorHasQueryParameterForASingleAsset ¶ added in v0.5.6
func EnsureTaskNameIsUnique ¶
func EnsureTaskNameIsUniqueForASingleAsset ¶ added in v0.5.6
func EnsureTaskNameIsValidForASingleAsset ¶ added in v0.5.6
func EnsureTimeIntervalIsValidForAsset ¶ added in v0.11.300
func EnsureTypeIsCorrectForASingleAsset ¶ added in v0.5.6
func ValidateAssetDirectoryExist ¶ added in v0.11.55
func ValidateAssetSeedValidation ¶ added in v0.11.128
func ValidateCrossPipelineURIDependencies ¶ added in v0.11.280
func ValidateCrossPipelineURIDependencies(ctx context.Context, pipelines []*pipeline.Pipeline) ([]*Issue, error)
ValidateCrossPipelineURIDependencies validates all URI dependencies across all pipelines and returns warnings for any URI dependencies that cannot be resolved or duplicate URIs.
func ValidateCustomCheckQueryExists ¶ added in v0.11.122
func ValidateCustomCheckQueryExists(ctx context.Context, p *pipeline.Pipeline, asset *pipeline.Asset) ([]*Issue, error)
ValidateCustomCheckQueryExists checks for duplicate column checks within a single column. It returns a slice of Issues, each representing a duplicate column check found.
func ValidateDuplicateColumnNames ¶ added in v0.11.35
func ValidateDuplicateColumnNames(ctx context.Context, p *pipeline.Pipeline, asset *pipeline.Asset) ([]*Issue, error)
ValidateDuplicateColumnNames checks for duplicate column names within a single asset. It returns a slice of Issues, each representing a duplicate column name found.
The function performs a case-insensitive comparison of column names.
Parameters:
- ctx: The context for the validation operation
- p: A pointer to the pipeline.Pipeline struct
- asset: The pipeline.Asset to be validated for duplicate column names.
Returns:
- A slice of *Issue, each describing a duplicate column name found.
- An error, which is always nil in this implementation.
func ValidateDuplicateTags ¶ added in v0.11.280
func ValidateDuplicateTags(ctx context.Context, p *pipeline.Pipeline, asset *pipeline.Asset) ([]*Issue, error)
ValidateDuplicateTags checks for duplicate tags within an asset and its columns. It performs case-insensitive comparisons to find duplicates and returns issues for any repeated tags found either on the asset itself or within individual columns.
func ValidateEMRServerlessAsset ¶ added in v0.11.171
func ValidatePythonAssetMaterialization ¶ added in v0.11.143
func ValidateTableSensorTableParameter ¶ added in v0.11.296
type Linter ¶
type Linter struct {
// contains filtered or unexported fields
}
func (*Linter) LintPipeline ¶ added in v0.4.1
func (*Linter) LintPipelines ¶
type PipelineAnalysisResult ¶
type PipelineAnalysisResult struct {
Pipelines []*PipelineIssues `json:"pipelines"`
AssetWithExcludeTagCount int
}
func (*PipelineAnalysisResult) ErrorCount ¶
func (p *PipelineAnalysisResult) ErrorCount() int
ErrorCount returns the number of errors found in an analysis result.
func (*PipelineAnalysisResult) MarshalJSON ¶ added in v0.6.8
func (p *PipelineAnalysisResult) MarshalJSON() ([]byte, error)
func (*PipelineAnalysisResult) WarningCount ¶ added in v0.11.14
func (p *PipelineAnalysisResult) WarningCount() int
WarningCount returns the number of warnings, a.k.a non-critical issues found in an analysis result.
type PipelineIssues ¶
func RunLintRulesOnPipeline ¶ added in v0.4.1
func (*PipelineIssues) MarshalJSON ¶ added in v0.6.8
func (p *PipelineIssues) MarshalJSON() ([]byte, error)
type PipelineValidator ¶
type PolicySpecification ¶ added in v0.11.195
type PolicySpecification struct {
Definitions []*RuleDefinition `yaml:"custom_rules"`
RuleSets []RuleSet `yaml:"rulesets"`
// contains filtered or unexported fields
}
func (*PolicySpecification) Rules ¶ added in v0.11.195
func (spec *PolicySpecification) Rules(sqlParser sqlParser) ([]Rule, error)
we need to pass in the sqlparser to the policy because of the query-matches-columns rule.
type Printer ¶
type Printer struct {
RootCheckPath string
}
func (*Printer) PrintIssues ¶
func (l *Printer) PrintIssues(analysis *PipelineAnalysisResult)
func (*Printer) PrintJSON ¶ added in v0.6.8
func (l *Printer) PrintJSON(analysis *PipelineAnalysisResult) error
type QueryValidatorRule ¶
type QueryValidatorRule struct {
Identifier string
Fast bool
TaskType pipeline.AssetType
Connections connectionManager
Extractor queryExtractor
Materializer materializer
WorkerCount int
Logger logger.Logger
}
func (*QueryValidatorRule) GetApplicableLevels ¶ added in v0.5.6
func (q *QueryValidatorRule) GetApplicableLevels() []Level
func (*QueryValidatorRule) GetSeverity ¶ added in v0.11.14
func (q *QueryValidatorRule) GetSeverity() ValidatorSeverity
func (*QueryValidatorRule) IsFast ¶ added in v0.11.53
func (q *QueryValidatorRule) IsFast() bool
func (*QueryValidatorRule) Name ¶
func (q *QueryValidatorRule) Name() string
func (*QueryValidatorRule) ValidateAsset ¶ added in v0.5.6
func (*QueryValidatorRule) ValidateCrossPipeline ¶ added in v0.11.280
type Rule ¶
type Rule interface {
Name() string
IsFast() bool
Validate(ctx context.Context, pipeline *pipeline.Pipeline) ([]*Issue, error)
ValidateAsset(ctx context.Context, pipeline *pipeline.Pipeline, asset *pipeline.Asset) ([]*Issue, error)
ValidateCrossPipeline(ctx context.Context, pipelines []*pipeline.Pipeline) ([]*Issue, error)
GetApplicableLevels() []Level
GetSeverity() ValidatorSeverity
}
func FilterRulesByLevel ¶ added in v0.5.6
func FilterRulesBySpeed ¶ added in v0.11.53
type RuleDefinition ¶ added in v0.11.195
type RuleDefinition struct {
Name string `yaml:"name"`
Description string `yaml:"description"`
Criteria string `yaml:"criteria"`
RuleTarget RuleTarget `yaml:"target"`
// contains filtered or unexported fields
}
type RuleTarget ¶ added in v0.11.198
type RuleTarget string
func (RuleTarget) Valid ¶ added in v0.11.198
func (target RuleTarget) Valid() bool
type SimpleRule ¶
type SimpleRule struct {
Identifier string
Fast bool
Validator PipelineValidator
AssetValidator AssetValidator
CrossPipelineValidator CrossPipelineValidator
ApplicableLevels []Level
Severity ValidatorSeverity
}
func GetCustomCheckQueryDryRunRule ¶ added in v0.11.223
func GetCustomCheckQueryDryRunRule(connectionManager connectionManager, renderer jinja.RendererInterface) *SimpleRule
func (*SimpleRule) GetApplicableLevels ¶ added in v0.5.6
func (g *SimpleRule) GetApplicableLevels() []Level
func (*SimpleRule) GetSeverity ¶ added in v0.11.14
func (g *SimpleRule) GetSeverity() ValidatorSeverity
func (*SimpleRule) IsFast ¶ added in v0.11.53
func (g *SimpleRule) IsFast() bool
func (*SimpleRule) Name ¶
func (g *SimpleRule) Name() string
func (*SimpleRule) ValidateAsset ¶ added in v0.5.6
func (*SimpleRule) ValidateCrossPipeline ¶ added in v0.11.280
type TableNameValidationRule ¶ added in v0.11.296
type UsedTableValidatorRule ¶ added in v0.11.14
type UsedTableValidatorRule struct {
// contains filtered or unexported fields
}
func (UsedTableValidatorRule) GetApplicableLevels ¶ added in v0.11.14
func (u UsedTableValidatorRule) GetApplicableLevels() []Level
func (UsedTableValidatorRule) GetSeverity ¶ added in v0.11.14
func (u UsedTableValidatorRule) GetSeverity() ValidatorSeverity
func (UsedTableValidatorRule) IsFast ¶ added in v0.11.53
func (u UsedTableValidatorRule) IsFast() bool
func (UsedTableValidatorRule) Name ¶ added in v0.11.14
func (u UsedTableValidatorRule) Name() string
func (UsedTableValidatorRule) ValidateAsset ¶ added in v0.11.14
func (UsedTableValidatorRule) ValidateCrossPipeline ¶ added in v0.11.280
type ValidatorSeverity ¶ added in v0.11.14
type ValidatorSeverity int
const ( ValidatorSeverityWarning ValidatorSeverity = iota ValidatorSeverityCritical )
type WarnRegularYamlFiles ¶ added in v0.11.177
type WarnRegularYamlFiles struct {
// contains filtered or unexported fields
}