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/reference/configuration.md
+33-1Lines changed: 33 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -248,32 +248,64 @@ For example, you might have a specific connection where your tests should run re
248
248
249
249
## Debug mode
250
250
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".
252
255
253
256
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.
254
257
255
258
Example enabling debug mode for the CLI command `sqlmesh plan`:
256
259
257
260
=== "Bash"
258
261
262
+
```bash
263
+
$ sqlmesh --debug plan
264
+
```
265
+
259
266
```bash
260
267
$ SQLMESH_DEBUG=1 sqlmesh plan
261
268
```
262
269
263
270
=== "MS Powershell"
264
271
272
+
```powershell
273
+
PS> sqlmesh --debug plan
274
+
```
275
+
265
276
```powershell
266
277
PS> $env:SQLMESH_DEBUG=1
267
278
PS> sqlmesh plan
268
279
```
269
280
270
281
=== "MS CMD"
271
282
283
+
```cmd
284
+
C:\> sqlmesh --debug plan
285
+
```
286
+
272
287
```cmd
273
288
C:\> set SQLMESH_DEBUG=1
274
289
C:\> sqlmesh plan
275
290
```
276
291
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
+
- `ci`(CI/CD or other non-interactive environment)
308
+
277
309
## Anonymized usage information
278
310
279
311
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