Skip to content

Commit

Permalink
feat(skylark): Pass previous dataset body to skylark for updates
Browse files Browse the repository at this point in the history
  • Loading branch information
dustmop committed Jun 4, 2018
1 parent 8ab4df6 commit 64e5b64
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions repo/actions/dataset.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ func (act Dataset) CreateDataset(name string, ds *dataset.Dataset, data cafs.Fil
return
}

if ds.Transform != nil && data == nil {
if ds.Transform != nil {
log.Info("running transformation...")
data, err = act.ExecTransform(ds)
data, err = act.ExecTransform(ds, data)
if err != nil {
return
}
Expand Down
4 changes: 2 additions & 2 deletions repo/actions/transform.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ import (
)

// ExecTransform executes a designated transformation
func (act Dataset) ExecTransform(ds *dataset.Dataset) (file cafs.File, err error) {
func (act Dataset) ExecTransform(ds *dataset.Dataset, infile cafs.File) (file cafs.File, err error) {
filepath := ds.Transform.ScriptPath
rr, err := skytf.ExecFile(ds, filepath)
rr, err := skytf.ExecFile(ds, filepath, infile)
if err != nil {
return nil, err
}
Expand Down

0 comments on commit 64e5b64

Please sign in to comment.