From fa6898ded7e3f52f4416e3eb9da31bd57961a843 Mon Sep 17 00:00:00 2001 From: Monica Gupta Date: Tue, 17 Mar 2020 09:02:58 -0700 Subject: [PATCH] Pre-installs and registers kqlmagic (#9558) Co-authored-by: Monica Gupta --- extensions/notebook/src/jupyter/jupyterServerInstallation.ts | 3 +++ extensions/notebook/src/jupyter/jupyterSessionManager.ts | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/extensions/notebook/src/jupyter/jupyterServerInstallation.ts b/extensions/notebook/src/jupyter/jupyterServerInstallation.ts index 0082a40dd5..2a78483ef5 100644 --- a/extensions/notebook/src/jupyter/jupyterServerInstallation.ts +++ b/extensions/notebook/src/jupyter/jupyterServerInstallation.ts @@ -87,6 +87,9 @@ export class JupyterServerInstallation implements IJupyterServerInstallation { }, { name: 'sparkmagic', version: '0.12.9' + }, { + name: 'Kqlmagic', + version: '0.1.108' } ]; diff --git a/extensions/notebook/src/jupyter/jupyterSessionManager.ts b/extensions/notebook/src/jupyter/jupyterSessionManager.ts index 76a6a89d87..2ffb70cfc2 100644 --- a/extensions/notebook/src/jupyter/jupyterSessionManager.ts +++ b/extensions/notebook/src/jupyter/jupyterSessionManager.ts @@ -350,6 +350,10 @@ export class JupyterSession implements nb.ISession { allCode += `%set_env ${key}=${process.env[key]}${EOL}`; } } + + // Add and register Kqlmagic to the python kernel + allCode += `%reload_ext Kqlmagic`; + let future = this.sessionImpl.kernel.requestExecute({ code: allCode, silent: true,