Skip to content

Commit 1deb3f6

Browse files
committed
Add docs
1 parent 3d4fc32 commit 1deb3f6

1 file changed

Lines changed: 35 additions & 1 deletion

File tree

docs/reference/configuration.md

Lines changed: 35 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,32 +248,66 @@ For example, you might have a specific connection where your tests should run re
248248

249249
## Debug mode
250250

251-
To enable debug mode set the `SQLMESH_DEBUG` environment variable to one of the following values: "1", "true", "t", "yes" or "y".
251+
Enable debug mode in one of two ways:
252+
253+
- Pass the `--debug` flag between the CLI command and the subcommand. For example, `sqlmesh --debug plan`.
254+
- Set the `SQLMESH_DEBUG` environment variable to one of the following values: "1", "true", "t", "yes" or "y".
252255

253256
Enabling this mode ensures that full backtraces are printed when using CLI. The default log level is set to `DEBUG` when this mode is enabled.
254257

255258
Example enabling debug mode for the CLI command `sqlmesh plan`:
256259

257260
=== "Bash"
258261

262+
```bash
263+
$ sqlmesh --debug plan
264+
```
265+
259266
```bash
260267
$ SQLMESH_DEBUG=1 sqlmesh plan
261268
```
262269

263270
=== "MS Powershell"
264271

272+
```powershell
273+
PS> sqlmesh --debug plan
274+
```
275+
265276
```powershell
266277
PS> $env:SQLMESH_DEBUG=1
267278
PS> sqlmesh plan
268279
```
269280

270281
=== "MS CMD"
271282

283+
```cmd
284+
C:\> sqlmesh --debug plan
285+
```
286+
272287
```cmd
273288
C:\> set SQLMESH_DEBUG=1
274289
C:\> sqlmesh plan
275290
```
276291

292+
## Runtime Environment
293+
294+
SQLMesh can run in different runtime environments. For example, you might run it in a regular command-line terminal, in a Jupyter notebook, or in Github's CI/CD platform.
295+
296+
When it starts up, SQLMesh automatically detects the runtime environment and adjusts its behavior accordingly. For example, it registers `%magic` commands if in a Jupyter notebook and adjusts logging behavior if in a CI/CD environment.
297+
298+
If necessary, you may force SQLMesh to use a specific runtime environment by setting the `SQLMESH_RUNTIME_ENVIRONMENT` environment variable.
299+
300+
It accepts the following values, which will cause SQLMesh to behave as if it were in the runtime environment in parentheses:
301+
302+
- `terminal` (CLI console)
303+
- `databricks` (Databricks notebook)
304+
- `google_colab` (Google Colab notebook)
305+
- `jupyter` (Jupyter notebook)
306+
- `debugger` (Debugging output)
307+
- `non_interactive` (environment without real-time interactivity, such as CI/CD)
308+
- `ci` (CI/CD environment, equivalent to `non_interactive`)
309+
310+
277311
## Anonymized usage information
278312

279313
We strive to make SQLMesh the best data transformation tool on the market. Part of accomplishing that is continually fixing bugs, adding features, and improving SQLMesh's performance.

0 commit comments

Comments
 (0)