Restore Target logic

This commit is contained in:
Lennart Kats 2024-12-20 16:49:46 +01:00
parent 8eb96ccb7d
commit 86cf7e0732
No known key found for this signature in database
GPG Key ID: 1EB8B57673197023
1 changed files with 5 additions and 0 deletions

View File

@ -73,6 +73,11 @@ func (m *applyPresetsCatalogSchema) Apply(ctx context.Context, b *bundle.Bundle)
if pl.Catalog == "" {
pl.Catalog = p.Catalog
}
if pl.Schema == "" && pl.Target == "" {
// As of 2024-12, the Schema field isn't broadly supported yet in the pipelines API.
// Until it is, we set the Target field.
pl.Target = p.Schema
}
if allSameCatalog && pl.Catalog == p.Catalog {
// Just for the common case where all pipelines have the same catalog,
// we show a recommendation to leave it out and rely on presets.