Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions generator/recipe.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ version: {{.Version}}
source:
{{- with .Source }}
name: {{.Name}}
{{- if .Scope}}
scope: {{.Scope}}
{{- end}}
config: {{.SampleConfig | rawfmt | indent 4}}
{{- end }}
{{- if ne (len .Sinks) 0 }}
Expand Down
3 changes: 2 additions & 1 deletion plugins/base_extractor.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package plugins
import "context"

type BaseExtractor struct {
ScopeNotRequired bool
BasePlugin
}

Expand All @@ -14,7 +15,7 @@ func NewBaseExtractor(info Info, configRef interface{}) BaseExtractor {

// Validate checks if the given options is valid for the plugin.
func (p *BaseExtractor) Validate(config Config) error {
if config.URNScope == "" {
if config.URNScope == "" && !p.ScopeNotRequired {
return ErrEmptyURNScope
}

Expand Down
1 change: 1 addition & 0 deletions plugins/extractors/bigquery/bigquery.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ func New(logger log.Logger) *Extractor {
galClient: galc,
}
e.BaseExtractor = plugins.NewBaseExtractor(info, &e.config)
e.ScopeNotRequired = true

return e
}
Expand Down
1 change: 1 addition & 0 deletions plugins/extractors/bigtable/bigtable.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ func New(logger log.Logger) *Extractor {
logger: logger,
}
e.BaseExtractor = plugins.NewBaseExtractor(info, &e.config)
e.ScopeNotRequired = true

return e
}
Expand Down
1 change: 1 addition & 0 deletions plugins/extractors/gcs/gcs.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ func New(logger log.Logger) *Extractor {
logger: logger,
}
e.BaseExtractor = plugins.NewBaseExtractor(info, &e.config)
e.ScopeNotRequired = true

return e
}
Expand Down
2 changes: 2 additions & 0 deletions plugins/extractors/redshift/redshift.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ func New(logger log.Logger, opts ...Option) *Extractor {
logger: logger,
}
e.BaseExtractor = plugins.NewBaseExtractor(info, &e.config)
e.ScopeNotRequired = true

for _, opt := range opts {
opt(e)
}
Expand Down