Documentation ¶
Index ¶
- Constants
- Variables
- func NewBuilder(config BuilderConfig, yamlTaskCreator TaskCreator, ...) *builder
- type Asset
- func (a *Asset) AddDownstream(asset *Asset)
- func (a *Asset) AddUpstream(asset *Asset)
- func (a *Asset) ColumnNames() []string
- func (a *Asset) ColumnNamesWithPrimaryKey() []string
- func (a *Asset) ColumnNamesWithUpdateOnMerge() []string
- func (a *Asset) GetDownstream() []*Asset
- func (a *Asset) GetFullDownstream() []*Asset
- func (a *Asset) GetFullUpstream() []*Asset
- func (a *Asset) GetUpstream() []*Asset
- type AssetCollection
- type AssetMaterializationMap
- type AssetType
- type BuilderConfig
- type Column
- type ColumnCheck
- type ColumnCheckValue
- type CustomCheck
- type DefinitionFile
- type EmptyStringMap
- type ExecutableFile
- type Materialization
- type MaterializationStrategy
- type MaterializationType
- type Materializer
- type MaterializerFunc
- type Notifications
- type Pipeline
- func (p *Pipeline) GetAssetByName(assetName string) *Asset
- func (p *Pipeline) GetAssetByPath(assetPath string) *Asset
- func (p *Pipeline) GetConnectionNameForAsset(asset *Asset) (string, error)
- func (p *Pipeline) GetMajorityAssetTypesFromSQLAssets(defaultIfNone AssetType) AssetType
- func (p *Pipeline) HasAssetType(taskType AssetType) bool
- func (p *Pipeline) RelativeAssetPath(t *Asset) string
- type SecretMapping
- type SlackNotification
- type TaskCreator
- type TaskDefinitionFile
- type TaskDefinitionType
- type TaskSchedule
Constants ¶
View Source
const ( CommentTask TaskDefinitionType = "comment" YamlTask TaskDefinitionType = "yaml" AssetTypePython = AssetType("python") AssetTypeSnowflakeQuery = AssetType("sf.sql") AssetTypeSnowflakeQuerySensor = AssetType("sf.sensor.query") AssetTypeBigqueryQuery = AssetType("bq.sql") AssetTypeBigqueryTableSensor = AssetType("bq.sensor.table") AssetTypeEmpty = AssetType("empty") AssetTypePostgresQuery = AssetType("pg.sql") AssetTypeRedshiftQuery = AssetType("rs.sql") AssetTypeMsSQLQuery = AssetType("ms.sql") AssetTypeSynapseQuery = AssetType("synapse.sql") AssetTypeIngestr = AssetType("ingestr") )
Variables ¶
View Source
var AllAvailableMaterializationStrategies = []MaterializationStrategy{ MaterializationStrategyCreateReplace, MaterializationStrategyDeleteInsert, MaterializationStrategyAppend, MaterializationStrategyMerge, }
View Source
var AssetTypeConnectionMapping = map[AssetType]string{ AssetTypeBigqueryQuery: "google_cloud_platform", AssetTypeBigqueryTableSensor: "google_cloud_platform", AssetTypeSnowflakeQuery: "snowflake", AssetTypeSnowflakeQuerySensor: "snowflake", AssetTypePostgresQuery: "postgres", AssetTypeRedshiftQuery: "redshift", AssetTypeMsSQLQuery: "mssql", AssetTypeSynapseQuery: "synapse", }
View Source
var IngestrTypeConnectionMapping = map[string]AssetType{ "bigquery": AssetTypeBigqueryQuery, "snowflake": AssetTypeSnowflakeQuery, "postgres": AssetTypePostgresQuery, "redshift": AssetTypeRedshiftQuery, "mssql": AssetTypeMsSQLQuery, "synapse": AssetTypeSynapseQuery, }
Functions ¶
func NewBuilder ¶
func NewBuilder(config BuilderConfig, yamlTaskCreator TaskCreator, commentTaskCreator TaskCreator, fs afero.Fs) *builder
Types ¶
type Asset ¶
type Asset struct { ID string `json:"id"` Name string `json:"name"` Description string `json:"description"` Type AssetType `json:"type"` ExecutableFile ExecutableFile `json:"executable_file"` DefinitionFile TaskDefinitionFile `json:"definition_file"` Parameters EmptyStringMap `json:"parameters"` Connection string `json:"connection"` Secrets []SecretMapping `json:"secrets"` DependsOn []string `json:"upstream"` Materialization Materialization `json:"materialization"` Columns []Column `json:"columns"` CustomChecks []CustomCheck `json:"custom_checks"` Image string `json:"image"` Instance string `json:"instance"` Owner string `json:"owner"` Metadata EmptyStringMap `json:"metadata"` Pipeline *Pipeline `json:"-"` // contains filtered or unexported fields }
func ConvertYamlToTask ¶
func (*Asset) AddDownstream ¶
func (*Asset) AddUpstream ¶
func (*Asset) ColumnNames ¶ added in v0.5.0
func (*Asset) ColumnNamesWithPrimaryKey ¶ added in v0.5.0
func (*Asset) ColumnNamesWithUpdateOnMerge ¶ added in v0.5.0
func (*Asset) GetDownstream ¶
func (*Asset) GetFullDownstream ¶
func (*Asset) GetFullUpstream ¶
func (*Asset) GetUpstream ¶
type AssetCollection ¶ added in v0.6.6
type AssetCollection []*Asset
func (AssetCollection) MarshalJSON ¶ added in v0.6.6
func (ac AssetCollection) MarshalJSON() ([]byte, error)
type AssetMaterializationMap ¶ added in v0.5.0
type AssetMaterializationMap map[MaterializationType]map[MaterializationStrategy]MaterializerFunc
type BuilderConfig ¶
type Column ¶
type ColumnCheck ¶
type ColumnCheck struct { ID string `json:"id"` Name string `json:"name"` Value ColumnCheckValue `json:"value"` }
func NewColumnCheck ¶ added in v0.3.0
func NewColumnCheck(assetName, columnName, name string, value ColumnCheckValue) ColumnCheck
type ColumnCheckValue ¶
type ColumnCheckValue struct { IntArray *[]int `json:"int_array"` Int *int `json:"int"` Float *float64 `json:"float"` StringArray *[]string `json:"string_array"` String *string `json:"string"` Bool *bool `json:"bool"` }
func (*ColumnCheckValue) MarshalJSON ¶
func (ccv *ColumnCheckValue) MarshalJSON() ([]byte, error)
func (*ColumnCheckValue) UnmarshalJSON ¶ added in v0.5.0
func (ccv *ColumnCheckValue) UnmarshalJSON(data []byte) error
type CustomCheck ¶
type DefinitionFile ¶
type EmptyStringMap ¶
func (EmptyStringMap) MarshalJSON ¶
func (m EmptyStringMap) MarshalJSON() ([]byte, error)
func (*EmptyStringMap) UnmarshalJSON ¶ added in v0.5.0
func (b *EmptyStringMap) UnmarshalJSON(data []byte) error
type ExecutableFile ¶
type Materialization ¶
type Materialization struct { Type MaterializationType `json:"type"` Strategy MaterializationStrategy `json:"strategy"` PartitionBy string `json:"partition_by"` ClusterBy []string `json:"cluster_by"` IncrementalKey string `json:"incremental_key"` }
func (Materialization) MarshalJSON ¶
func (m Materialization) MarshalJSON() ([]byte, error)
type MaterializationStrategy ¶
type MaterializationStrategy string
const ( MaterializationStrategyNone MaterializationStrategy = "" MaterializationStrategyCreateReplace MaterializationStrategy = "create+replace" MaterializationStrategyDeleteInsert MaterializationStrategy = "delete+insert" MaterializationStrategyAppend MaterializationStrategy = "append" MaterializationStrategyMerge MaterializationStrategy = "merge" )
type MaterializationType ¶
type MaterializationType string
const ( MaterializationTypeNone MaterializationType = "" MaterializationTypeView MaterializationType = "view" MaterializationTypeTable MaterializationType = "table" )
type Materializer ¶ added in v0.5.0
type Materializer struct { MaterializationMap AssetMaterializationMap FullRefresh bool }
type MaterializerFunc ¶ added in v0.5.0
type Notifications ¶
type Notifications struct {
Slack []SlackNotification `json:"slack"`
}
func (Notifications) MarshalJSON ¶
func (n Notifications) MarshalJSON() ([]byte, error)
type Pipeline ¶
type Pipeline struct { LegacyID string `yaml:"id" json:"legacy_id"` Name string `yaml:"name" json:"name"` Schedule schedule `yaml:"schedule" json:"schedule"` StartDate string `yaml:"start_date" json:"start_date"` DefinitionFile DefinitionFile `json:"definition_file"` DefaultParameters EmptyStringMap `yaml:"default_parameters" json:"default_parameters"` DefaultConnections EmptyStringMap `yaml:"default_connections" json:"default_connections"` Assets AssetCollection `json:"assets"` Notifications Notifications `yaml:"notifications" json:"notifications"` Catchup bool `yaml:"catchup" json:"catchup"` Retries int `yaml:"retries" json:"retries"` TasksByType map[AssetType][]*Asset `json:"-"` // contains filtered or unexported fields }
func (*Pipeline) GetAssetByName ¶ added in v0.5.6
func (*Pipeline) GetAssetByPath ¶
func (*Pipeline) GetConnectionNameForAsset ¶
func (*Pipeline) GetMajorityAssetTypesFromSQLAssets ¶ added in v0.9.1
func (*Pipeline) HasAssetType ¶
func (*Pipeline) RelativeAssetPath ¶
type SecretMapping ¶
type SlackNotification ¶
type SlackNotification struct {
Channel string `json:"channel"`
}
type TaskCreator ¶
func CreateTaskFromFileComments ¶
func CreateTaskFromFileComments(fs afero.Fs) TaskCreator
func CreateTaskFromYamlDefinition ¶
func CreateTaskFromYamlDefinition(fs afero.Fs) TaskCreator
type TaskDefinitionFile ¶
type TaskDefinitionFile struct { Name string `json:"name"` Path string `json:"path"` Type TaskDefinitionType `json:"type"` }
type TaskDefinitionType ¶
type TaskDefinitionType string
type TaskSchedule ¶
type TaskSchedule struct {
Days []string `json:"days"`
}
Click to show internal directories.
Click to hide internal directories.