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: src/documentation/setup/config.malloynb
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -28,7 +28,7 @@ The `is` field identifies the connection type. All other fields are type-specifi
28
28
29
29
### Where the config file lives
30
30
31
-
- **VS Code Extension** — place `malloy-config.json` in your workspace root. The extension detects it automatically and picks up changes on save. In multi-root workspaces, each root can have its own file.
31
+
- **VS Code Extension** — place `malloy-config.json` in your workspace root. The extension detects it automatically and picks up changes on save. In multi-root workspaces, each root can have its own file. You can also set a global fallback directory via the `malloy.globalConfigDirectory` setting (e.g. `~/.config/malloy`) — this is used when no workspace config file exists.
32
32
- **Malloy CLI** — `~/.config/malloy/malloy-config.json`. See the [CLI setup](cli.malloynb) for details.
33
33
34
34
---
@@ -145,9 +145,9 @@ SET search_path TO analytics; CREATE TEMP TABLE foo AS SELECT 1;
145
145
146
146
---
147
147
148
-
## Sensitive Values
148
+
## Environment Variables
149
149
150
-
Fields with type `password` or `secret` contain sensitive values like credentials and API tokens. Instead of putting these directly in your config file, you can use an environment variable reference:
150
+
Any property value can be replaced with an environment variable reference. This is especially useful for sensitive values like passwords and API tokens, so they don't need to appear directly in your config file:
Copy file name to clipboardExpand all lines: src/documentation/setup/extension.malloynb
+30-7Lines changed: 30 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -48,9 +48,19 @@ The Malloy Extension also works in VS Code Web environments like github.dev. Pre
48
48
There are two ways to configure database connections:
49
49
50
50
1. **`malloy-config.json`** (recommended) — a project-level config file checked into source control
51
-
2. **VS Code Settings** — user-level configuration via the command palette
51
+
2. **VS Code Settings** — user-level configuration via the Connections sidebar
52
52
53
-
**Note:** If a `malloy-config.json` exists in your workspace root, VS Code settings for connections are ignored entirely — all connections come from the config file.
53
+
When both exist, config file connections take priority. Settings connections are used as a fallback for any connection names not defined in the config file.
54
+
55
+
### Connections Sidebar
56
+
57
+
The **Malloy Connections** sidebar shows all configured connections grouped by source:
58
+
59
+
- **Config** — Connections from discovered `malloy-config.json` files. These are read-only in the editor; edit the JSON file directly to make changes.
60
+
- **Settings** — User-defined connections from VS Code settings. Editable through the connection editor. If a settings connection has the same name as a config connection, it appears as "(shadowed)" since the config version takes priority.
61
+
- **Defaults** — One entry per supported database type, using built-in defaults. Click to create a new settings connection from the default.
62
+
63
+
Click any connection to open the connection editor, or use the **+** button to create a new connection.
54
64
55
65
### Project Configuration: `malloy-config.json`
56
66
@@ -60,18 +70,31 @@ See **[Configuration](config.malloynb)** for the full config file format, connec
60
70
61
71
### VS Code Settings
62
72
63
-
You can also configure connections through the VS Code command palette:
73
+
You can also configure connections through the Connections sidebar or the command palette:
64
74
65
75
1. Open Command Palette: `Cmd+Shift+P` (Mac) or `Ctrl+Shift+P` (Windows/Linux)
66
76
2. Type: **Malloy: Edit Connections**
67
77
3. Click **Add Connection** and select your database type
68
78
4. Fill in the connection details
69
79
70
-
VS Code stores these in your user settings:
80
+
Sensitive values (passwords, tokens) are stored securely in your system keychain.
81
+
82
+
### Connection Editor
83
+
84
+
The connection editor lets you view and manage individual connections:
85
+
86
+
- **Test** — Verify the connection works with the current settings
87
+
- **Duplicate** — Create a copy of an existing connection
88
+
- **Delete** — Remove a settings connection
89
+
90
+
Config file connections open in a read-only view. You can still test them, but edit the JSON file directly to change settings.
| `malloy.globalConfigDirectory` | Directory containing a global `malloy-config.json`, used as a fallback when no workspace config file exists (e.g. `~/.config/malloy`) | `""` |
97
+
| `malloy.projectConnectionsOnly` | Only use workspace config file connections — hides global config, settings, and defaults | `false` |
0 commit comments