diff --git a/src/sql/workbench/contrib/notebook/browser/notebookActions.ts b/src/sql/workbench/contrib/notebook/browser/notebookActions.ts index d49cb707de..e219387e4d 100644 --- a/src/sql/workbench/contrib/notebook/browser/notebookActions.ts +++ b/src/sql/workbench/contrib/notebook/browser/notebookActions.ts @@ -363,11 +363,14 @@ export class RunParametersAction extends TooltipFromLabelAction { **/ public async openParameterizedNotebook(uri: URI): Promise { const editor = this._notebookService.findNotebookEditor(uri); - let modelContents = JSON.stringify(editor.model.toJSON()); + let modelContents = editor.model.toJSON(); + modelContents.cells.forEach(cell => { + cell.outputs = []; + }); let untitledUriPath = this._notebookService.getUntitledUriPath(path.basename(uri.fsPath)); let untitledUri = uri.with({ authority: '', scheme: 'untitled', path: untitledUriPath }); this._notebookService.openNotebook(untitledUri, { - initialContent: modelContents, + initialContent: JSON.stringify(modelContents), preserveFocus: true }); }