A reactive notebook for Python — run reproducible experiments, query with SQL, execute as a script, deploy as an app, and version with git. Stored as pure Python. All in a modern, AI-native editor.
Python artificial-intelligencedagdata-sciencedata-visualizationdataflowdeveloper-toolsmachine-learningnotebookspipelinepythonreactivesqlweb-app
improvement: auto-install sqlglot when using mo.sql in wasm (#3900)
Myles Scolnick21d3156bbf4e
diff --git a/frontend/src/core/islands/worker/worker.tsx b/frontend/src/core/islands/worker/worker.tsxindex 692f5146f5..9e15fb6ee8 100644--- a/frontend/src/core/islands/worker/worker.tsx+++ b/frontend/src/core/islands/worker/worker.tsx@@ -89,6 +89,7 @@ const requestHandler = createRPCRequestHandler({// Add pandas and duckdb to the codecode = `import pandas\n${code}`;code = `import duckdb\n${code}`;+ code = `import sqlglot\n${code}`;}await self.pyodide.loadPackagesFromImports(code, {diff --git a/frontend/src/core/wasm/worker/bootstrap.ts b/frontend/src/core/wasm/worker/bootstrap.tsindex 917ffbe29c..342520a95a 100644--- a/frontend/src/core/wasm/worker/bootstrap.ts+++ b/frontend/src/core/wasm/worker/bootstrap.ts@@ -165,6 +165,7 @@ export class DefaultWasmController implements WasmController {// We need pandas and duckdb for mo.sqlcode = `import pandas\n${code}`;code = `import duckdb\n${code}`;+ code = `import sqlglot\n${code}`;}// Add:diff --git a/frontend/src/core/wasm/worker/worker.ts b/frontend/src/core/wasm/worker/worker.tsindex 7061fa7b81..5a879ee115 100644--- a/frontend/src/core/wasm/worker/worker.ts+++ b/frontend/src/core/wasm/worker/worker.ts@@ -140,6 +140,7 @@ const requestHandler = createRPCRequestHandler({// Add pandas and duckdb to the codecode = `import pandas\n${code}`;code = `import duckdb\n${code}`;+ code = `import sqlglot\n${code}`;}await self.pyodide.loadPackagesFromImports(code, {