From 8031f8b199fde1626220c580b6ced8c81b67201b Mon Sep 17 00:00:00 2001 From: Cory Rivera Date: Tue, 27 Aug 2019 11:19:17 -0700 Subject: [PATCH] Insert generated cell in Analyze in Notebook at index 0, rather than replacing first cell's contents. (#6965) --- extensions/notebook/src/extension.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/extensions/notebook/src/extension.ts b/extensions/notebook/src/extension.ts index 3f63c2a464..863650cfc9 100644 --- a/extensions/notebook/src/extension.ts +++ b/extensions/notebook/src/extension.ts @@ -234,12 +234,11 @@ async function analyzeNotebook(oeContext?: azdata.ObjectExplorerContext): Promis + os.EOL + '.option("header", "true")' + os.EOL + '.csv("{0}"))' + os.EOL + 'df.show(10)'; editor.edit(editBuilder => { - editBuilder.replace(0, { + editBuilder.insertCell({ cell_type: 'code', source: analyzeCommand.replace('{0}', hdfsPath) - }); + }, 0); }); - } } }