Skip to content
This repository was archived by the owner on Sep 25, 2025. It is now read-only.

Commit e0c9d61

Browse files
Merge pull request #56 from datacoves/mp_env_variables
Add docs for VS Code environment variables
2 parents d3bc93d + 23fe346 commit e0c9d61

9 files changed

+81
-0
lines changed

docs/_sidebar.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@
8989
- [Databricks](/how-tos/vscode/databricks_setup.md)
9090
- [Redshift](/how-tos/vscode/redshift_setup.md)
9191
- [Snowflake](/how-tos/vscode/snowflake_setup.md)
92+
- [Custom Environment Variables](/how-tos/vscode/environment-variables.md)
9293
- [Override VS Code settings](/how-tos/vscode/override.md)
9394
- [Reset User Env](/how-tos/vscode/reset-user-env.md)
9495
- [Reset Git](how-tos/vscode/reset-git.md)
167 KB
Loading
223 KB
Loading
168 KB
Loading
189 KB
Loading
174 KB
Loading
189 KB
Loading
427 KB
Loading
Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
# How to add Environment variables to VS Code
2+
3+
## Table of Contents
4+
- [Overview of Environment Variables in VS Code](#overview-of-environment-variables-in-vs-code)
5+
- [User Level Environment Variables](#user-level)
6+
- [Environment Level Environment Variables](#environment-level)
7+
- [Project Level Environment Variables](#project-level)
8+
- [Creating Environment Variables](#creating-variables)
9+
- [Deleting Environment Variables](#deleting-variables)
10+
11+
## Overview of Environment Variables in VS Code
12+
13+
Datacoves injects several[ environment variables](/reference/vscode/datacoves-env-vars.md) on your behalf. However, you may need to add additional variables to run scripts, test code etc. This doc will walk you through adding your own environment variables at the user, environment and project level. These variables are only available in your VS Code, not Airflow. For Airflow we recommend you use Airflow Variables or [Datacoves Secrets](/reference/admin-menu/secrets.md)
14+
15+
## User Level
16+
17+
Environment variables set at the user level will only be available to the workspace environment of the individual who created them.
18+
19+
### Step 1: Navigate to your user settings in the top right-hand corner
20+
21+
![User Settings](assets/menu_user_settings.gif)
22+
23+
### Step 2: Navigate to `VS Code Environment Variables`
24+
### Step 3: Select `Add`
25+
26+
![Environment Variables](assets/env_vars_user.png)
27+
28+
29+
## Environment Level
30+
31+
>[!NOTE] You must have admin permissions to add variables across the project or user environments.
32+
33+
Environment level variables will be available to everyone with access to the environment ie) The Development Environment.
34+
35+
### Step 1: Navigate to the environment menu
36+
37+
![Environment Menu](../datacoves/assets/menu_environments.gif)
38+
39+
### Step 2: Navigate to `VS Code Environment Variables`
40+
41+
![Environment variables menu](assets/env_var_environment_menu.png)
42+
43+
### Step 3: Select `Add`
44+
45+
![alt text](assets/env_var_environment_add.png)
46+
47+
## Project Level
48+
49+
Project level variables will be available across all environments in a project.
50+
51+
### Step 1: Navigate to the project menu
52+
53+
![Project Menu](../datacoves/assets/menu_projects.gif)
54+
55+
### Step 2: Navigate to `VS Code Environment Variables`
56+
57+
![Environment variables menu](assets/env_var_project_menu.png)
58+
59+
### Step 3: Select `Add`
60+
61+
![alt text](assets/env_var_project_add.png)
62+
63+
## Creating variables
64+
65+
Creating variables is simple. Add the key following the correct format and add the desired value.
66+
67+
![Create variables](assets/env_var_environment_create.png)
68+
69+
## Deleting variables
70+
71+
Deleting variables is also simple. Simply navigate to the Project or Environment settings.
72+
73+
### Step 1: Toggle the delete option or the red trashcan
74+
75+
### Step 2: Save Changes
76+
77+
If you do not save changes, the variable will not be deleted.
78+
79+
![Delete variables](assets/env_var_project_delete.png)
80+

0 commit comments

Comments
 (0)