Skip to content
This repository was archived by the owner on Sep 25, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/_sidebar.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@
- [Databricks](/how-tos/vscode/databricks_setup.md)
- [Redshift](/how-tos/vscode/redshift_setup.md)
- [Snowflake](/how-tos/vscode/snowflake_setup.md)
- [Custom Environment Variables](/how-tos/vscode/environment-variables.md)
- [Override VS Code settings](/how-tos/vscode/override.md)
- [Reset User Env](/how-tos/vscode/reset-user-env.md)
- [Reset Git](how-tos/vscode/reset-git.md)
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/how-tos/vscode/assets/env_vars_user.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
80 changes: 80 additions & 0 deletions docs/how-tos/vscode/environment-variables.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
# How to add Environment variables to VS Code

## Table of Contents
- [Overview of Environment Variables in VS Code](#overview-of-environment-variables-in-vs-code)
- [User Level Environment Variables](#user-level)
- [Environment Level Environment Variables](#environment-level)
- [Project Level Environment Variables](#project-level)
- [Creating Environment Variables](#creating-variables)
- [Deleting Environment Variables](#deleting-variables)

## Overview of Environment Variables in VS Code

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)

## User Level

Environment variables set at the user level will only be available to the workspace environment of the individual who created them.

### Step 1: Navigate to your user settings in the top right-hand corner

![User Settings](assets/menu_user_settings.gif)

### Step 2: Navigate to `VS Code Environment Variables`
### Step 3: Select `Add`

![Environment Variables](assets/env_vars_user.png)


## Environment Level

>[!NOTE] You must have admin permissions to add variables across the project or user environments.

Environment level variables will be available to everyone with access to the environment ie) The Development Environment.

### Step 1: Navigate to the environment menu

![Environment Menu](../datacoves/assets/menu_environments.gif)

### Step 2: Navigate to `VS Code Environment Variables`

![Environment variables menu](assets/env_var_environment_menu.png)

### Step 3: Select `Add`

![alt text](assets/env_var_environment_add.png)

## Project Level

Project level variables will be available across all environments in a project.

### Step 1: Navigate to the project menu

![Project Menu](../datacoves/assets/menu_projects.gif)

### Step 2: Navigate to `VS Code Environment Variables`

![Environment variables menu](assets/env_var_project_menu.png)

### Step 3: Select `Add`

![alt text](assets/env_var_project_add.png)

## Creating variables

Creating variables is simple. Add the key following the correct format and add the desired value.

![Create variables](assets/env_var_environment_create.png)

## Deleting variables

Deleting variables is also simple. Simply navigate to the Project or Environment settings.

### Step 1: Toggle the delete option or the red trashcan

### Step 2: Save Changes

If you do not save changes, the variable will not be deleted.

![Delete variables](assets/env_var_project_delete.png)