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
> The extension is currently in **preview** and as such is subject to change. You may also encounter bugs and api incompatibilities with the SQLMesh version you are running. We encourage you to try it and raise any issues [here](https://github.com/tobikodata/sqlmesh/issues).
3
+
> The extension is currently in **preview** and as such is subject to change. You may also encounter bugs and API incompatibilities with the SQLMesh version you are running. We encourage you to try it and raise any issues [here](https://github.com/tobikodata/sqlmesh/issues).
4
4
5
-
In this quickstart guide, you'll set up the SQLMesh extension in Visual Studio Code, we'll show you the capabilities of the extension and how to troubleshoot common issues.
5
+
In this quickstart guide, you'll set up the SQLMesh extension in Visual Studio Code. We'll show you the capabilities of the extension and how to troubleshoot common issues.
6
6
7
7
## Installation
8
8
9
9
Installation is done through the VSCode extension marketplace, search for `SQLMesh` and install the extension from the [marketplace](https://marketplace.visualstudio.com/items?itemName=tobikodata.sqlmesh). For a more in depth guide on how to install extensions, see the [VSCode documentation](https://code.visualstudio.com/docs/configure/extensions/extension-marketplace#_install-an-extension).
10
10
11
11
### Recommended setup
12
12
13
-
While installing the extension is simple, setting up a python environment correctly is a bit more involved. We do recommend using a dedicated *python virtual environment* to install SQLMesh. For a complete guide visit the [python documentation](https://docs.python.org/3/library/venv.html) but the following steps will create the virtual environment, activate it and install SQLMesh for both a SQLMesh core setup and a Tobiko Cloud setup.
13
+
While installing the extension is simple, setting up a Python environment correctly is a bit more involved. We do recommend using a dedicated *Python virtual environment* to install SQLMesh. For a complete guide, visit the [Python documentation](https://docs.python.org/3/library/venv.html), but the following steps will create the virtual environment, activate it, and install SQLMesh for both a SQLMesh core setup and a Tobiko Cloud setup.
14
14
15
15
#### SQLMesh Core
16
16
@@ -22,37 +22,37 @@ source .venv/bin/activate
22
22
pip install 'sqlmesh[lsp]'
23
23
```
24
24
25
-
Once you have the virtual environment, you can make sure that Visual Studio Code is using the correct python interpreter by going to the [command palette](https://code.visualstudio.com/docs/getstarted/userinterface#_command-palette) and running `Python: Select Interpreter`. Select the python executable in the virtual environment.
25
+
Once you have the virtual environment, you can ensure that Visual Studio Code is using the correct Python interpreter by going to the [command palette](https://code.visualstudio.com/docs/getstarted/userinterface#_command-palette) and running `Python: Select Interpreter`. Select the Python executable in the virtual environment.
Once that's done, you can validate that the extension is correctly using the virtual environment by checking the `sqlmesh` output channel in the [output panel](https://code.visualstudio.com/docs/getstarted/userinterface#_output-panel) which details the python path and the details of your SQLMesh installation and looks as follows:
29
+
Once that's done, you can validate that the extension is correctly using the virtual environment by checking the `sqlmesh` output channel in the [output panel](https://code.visualstudio.com/docs/getstarted/userinterface#_output-panel), which details the Python path and the details of your SQLMesh installation and looks as follows:
30
30
31
31

32
32
33
33
#### Tobiko Cloud
34
34
35
-
For Tobiko Cloud, the tcloud utility is used to install SQLMesh, so you'll need to set up a python environment, activate it and install SQLMesh using the tcloud utility as follows.
35
+
For Tobiko Cloud, the `tcloud` utility is used to install SQLMesh, so you'll need to set up a Python environment, activate it, and install SQLMesh using the tcloud utility as follows.
36
36
37
37
```bash
38
38
python -m venv .venv
39
39
source .venv/bin/activate
40
40
pip install tcloud
41
41
```
42
42
43
-
Once you have the virtual environment, you can make sure that Visual Studio Code is using the correct python interpreter by going to the [command palette](https://code.visualstudio.com/docs/getstarted/userinterface#_command-palette) and running `Python: Select Interpreter`. Select the python executable in the virtual environment.
43
+
Once you have the virtual environment, you can ensure that Visual Studio Code is using the correct Python interpreter by going to the [command palette](https://code.visualstudio.com/docs/getstarted/userinterface#_command-palette) and running `Python: Select Interpreter`. Select the Python executable in the virtual environment.
You can use the `tcloud` commands in your terminal to do the operations as usual, or the extension exposes the same commands through the command palette under the following commands:
47
+
You can use the `tcloud` commands in your terminal to perform operations as usual, or the extension exposes the same commands through the command palette under the following commands:
48
48
-`Sign in to Tobiko Cloud`
49
49
-`Sign out of Tobiko Cloud`
50
50
51
51
## Features
52
52
53
53
### Lineage
54
54
55
-
The extension adds a lineage view to the SQLMesh models. To view the lineage of a model, use the `Lineage` tab in the panel as shown below:
55
+
The extension adds a lineage view to SQLMesh models. To view the lineage of a model, use the `Lineage` tab in the panel as shown below:
56
56
57
57

58
58
@@ -66,27 +66,27 @@ The extension exposes the following commands through the command palette:
66
66
67
67
### LSP Features
68
68
69
-
The SQLMesh LSP adds a number of features to the editor:
69
+
The SQLMesh LSP adds several features to the editor:
70
70
71
71
**Completion**
72
72
73
-
When writing SQL models, keywords or model names, you should see a completion suggestion.
73
+
When writing SQL models, keywords, or model names, you should see completion suggestions.
74
74
75
75

76
76
77
77
**Go to definition and hover information**
78
78
79
-
The SQLMesh LSP adds a definition provider for SQLMesh models. When you hover over a model name, you should see a tooltip with the model description and on click you will be taken to the model definition.
79
+
The SQLMesh LSP adds a definition provider for SQLMesh models. When you hover over a model name, you should see a tooltip with the model description, and when you click, you will be taken to the model definition.
80
80
81
81
**Diagnostics**
82
82
83
-
The SQLMesh LSP adds a diagnostic provider for your SQLMesh project. If you have the SQLMesh linter enabled, issues will be reported in your editor. This works for both SQLMesh builtin rules and custom rules.
83
+
The SQLMesh LSP adds a diagnostic provider for your SQLMesh project. If you have the SQLMesh linter enabled, issues will be reported in your editor. This works for both SQLMesh built-in rules and custom rules.
84
84
85
85

86
86
87
87
**Formatting**
88
88
89
-
The SQLMesh LSP also adds a formatting provider for SQLMesh models. When you write SQL models, you should see the model formatted correctly.
89
+
The SQLMesh LSP also adds a formatting provider for SQLMesh models. When you write SQL models, you can use formatter to foramt models consistently.
90
90
91
91
## Troubleshooting
92
92
@@ -98,13 +98,12 @@ When installing SQLMesh, some dependencies that are required by the extension ar
98
98
pip install 'sqlmesh[lsp]'
99
99
```
100
100
101
-
If you are in a cloud environment, you can make sure the extension requirements are correctly installed by adding `lsp` to the list of extras required in the `tcloud.yaml` file.
101
+
If you are in a cloud environment, you can ensure the extension requirements are correctly installed by adding `lsp` to the list of extras required in the `tcloud.yaml` file.
102
102
103
103
### Python environment woes
104
104
105
-
The most common issue is that the extension is not using the correct python interpreter. We recommend following the [recommended setup](#recommended-setup) to ensure that the extension is using the correct python interpreter. If you have checked the `sqlmesh` output channel and the extension is still not using the correct python interpreter, please raise an issue [here](https://github.com/tobikodata/sqlmesh/issues).
105
+
The most common issue is that the extension is not using the correct Python interpreter. We recommend following the [recommended setup](#recommended-setup) to ensure that the extension is using the correct Python interpreter. If you have checked the `sqlmesh` output channel and the extension is still not using the correct Python interpreter, please raise an issue [here](https://github.com/tobikodata/sqlmesh/issues).
106
106
107
107
### SQLMesh compatibility
108
108
109
109
While the extension is in preview and the APIs to the underlying SQLMesh version are not stable, we do not guarantee compatibility between the extension and the SQLMesh version you are using. If you encounter an issue, please raise an issue [here](https://github.com/tobikodata/sqlmesh/issues).
0 commit comments