You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/guides/vscode.md
+10Lines changed: 10 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -149,6 +149,16 @@ Because the VSCode extension establishes a long-running process connected to the
149
149
150
150
Therefore, we do not recommend using DuckDB as a state store with the VSCode extension.
151
151
152
+
### Environment variables
153
+
154
+
The VSCode extension is based on a [language server](https://en.wikipedia.org/wiki/Language_Server_Protocol) that runs in the background as a separate process. When the VSCode extension starts the background language server, the server inherits environment variables from the environment where you started VSCode. The server does *not* inherit environment variables from your terminal instance in VSCode, so it may not have access to variables you use when calling SQLMesh from the CLI.
155
+
156
+
If you have environment variables that are needed by the context and the language server, you can use one of these approaches to pass variables to the language server:
157
+
158
+
- Open VSCode from a terminal that has the variables set
159
+
- Use environment variables pulled from somewhere else dynamically (e.g. a `.env` file) in your config
160
+
- Set the environment variables in the python environment that the extension uses. You can find detailed instructions [here](https://code.visualstudio.com/docs/python/environments#_environment-variables)
161
+
152
162
### Python environment woes
153
163
154
164
The most common problem is the extension not using the correct Python interpreter.
Copy file name to clipboardExpand all lines: docs/reference/notebook.md
+16-2Lines changed: 16 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -29,9 +29,9 @@ import sqlmesh
29
29
If desired, you can create the [quickstart example project](../quick_start.md) with the Python `init_example_project` function. The function requires a default SQL dialect for the project's models; this example uses `snowflake`:
30
30
31
31
```python
32
-
from sqlmesh.cli.example_projectimport init_example_project
32
+
from sqlmesh.cli.project_initimport init_example_project
0 commit comments