File tree Expand file tree Collapse file tree 1 file changed +2
-11
lines changed
Expand file tree Collapse file tree 1 file changed +2
-11
lines changed Original file line number Diff line number Diff line change 11package generate
22
33import (
4- "bytes"
54 "context"
65 "fmt"
7- "io"
86 "net/http"
97 "path"
108 "path/filepath"
@@ -14,12 +12,11 @@ import (
1412 "github.com/databricks/cli/libs/filer"
1513 "github.com/databricks/cli/libs/notebook"
1614 "github.com/databricks/databricks-sdk-go"
15+ "github.com/databricks/databricks-sdk-go/client"
1716 "github.com/databricks/databricks-sdk-go/service/jobs"
1817 "github.com/databricks/databricks-sdk-go/service/pipelines"
1918 "github.com/databricks/databricks-sdk-go/service/workspace"
2019 "golang.org/x/sync/errgroup"
21-
22- "github.com/databricks/databricks-sdk-go/client"
2320)
2421
2522type exportFile struct {
@@ -216,17 +213,11 @@ func (n *Downloader) FlushToDisk(ctx context.Context, force bool) error {
216213 }
217214 defer reader .Close ()
218215
219- // Read into buffer so we can write via the filer
220- content , err := io .ReadAll (reader )
221- if err != nil {
222- return err
223- }
224-
225216 mode := []filer.WriteMode {filer .CreateParentDirectories }
226217 if force {
227218 mode = append (mode , filer .OverwriteIfExists )
228219 }
229- err = n .outputFiler .Write (errCtx , targetPath , bytes . NewReader ( content ) , mode ... )
220+ err = n .outputFiler .Write (errCtx , targetPath , reader , mode ... )
230221 if err != nil {
231222 return err
232223 }
You can’t perform that action at this time.
0 commit comments