Events
Mar 31, 11 PM - Apr 2, 11 PM
The biggest Fabric, Power BI, and SQL learning event. March 31 – April 2. Use code FABINSIDER to save $400.
Register todayThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
The Synapse Visual Studio Code extension supports a pro-developer experience for exploring Microsoft Fabric lakehouses, and authoring Fabric notebooks and Spark job definitions. Learn more about the extension, including how to get started with the necessary prerequisites.
Visual Studio (VS) Code is a one of the most popular lightweight source code editors; it runs on your desktop and is available for Windows, macOS, and Linux. By installing the Synapse VS Code extension, you can author, run, and debug your notebook and Spark job definition locally in VS Code. You can also post the code to the remote Spark compute in your Fabric workspace to run or debug. The extension also allows you to browse your lakehouse data, including tables and raw files, in VS Code.
Prerequisites for the Synapse VS Code extension:
After you have installed the required software, you must update the operating system properties.
Open the Windows Settings and search for the setting "Edit the system environment variables".
Under System variables look for the variable JAVA_HOME. If it does not exist, click the New button, enter the variable name JAVA_HOME and and add the directory where Java is installed in the variable value field.
For example, if you install JDK at this path C:\Program Files\Java\jdk-1.8
, set the JAVA_HOME variable value to that path.
Under System variables look for the variable Path and double click that row. Add the following folder paths to the Path variable, by clicking the New button and adding the folder path:
%JAVA_HOME%/bin
For Conda add the following subfolders of the Conda installation. Add the full folder paths for theese subfolders
\miniconda3\condsbin
\miniconda3\Scripts
For example: C:\Users\john.doe\AppData\Local\miniconda3\condsbin
Run the conda.sh in the terminal:
Open the terminal window, change the directory to the folder where conda is installed, then change to the subdirectory etc/profile.d. The subdirectory should contain a file named conda.sh.
Execute source conda.sh
.
In the same terminal window, run sudo conda init
.
Type in Java --version
. The version should be Java 1.8.
Search for Synapse VS Code in the VS Code extension marketplace and install the extension.
After the extension installation is complete, restart VS Code. The icon for the extension is listed at the VS Code activity bar.
To edit a notebook, you must have a local copy of the notebook content. The local working directory of the extension serves as the local root folder for all downloaded notebooks, even notebooks from different workspaces. By invoking the command Synapse:Set Local Work Folder
, you can specify a folder as the local working directory for the extension.
To validate the setup, open the extension settings and check the details there:
From the VS Code command palette, enter the Synapse:Sign in
command to sign in to the extension. A separate browser sign-in page appears.
Enter your username and password.
After you successfully sign in, your username will be displayed in the VS Code status bar to indicate that you're signed in.
To sign out of the extension, enter the command Synapse: Sign off
.
To select a Fabric workspace, you must have a workspace created. If you don't have one, you can create one in the Fabric portal. For more information, see Create a workspace.
Once you have a workspace, choose it by selecting the Select Workspace option. A list appears of all workspaces that you have access to; select the one you want from the list.
In this overview, you get a basic understanding of how to install and set up the Synapse VS Code extension. The next articles explain how to develop your notebooks and Spark job definitions locally in VS Code.
Events
Mar 31, 11 PM - Apr 2, 11 PM
The biggest Fabric, Power BI, and SQL learning event. March 31 – April 2. Use code FABINSIDER to save $400.
Register todayTraining
Module
Developing in the Windows Subsystem for Linux with Visual Studio Code - Training
In this module, you learn how to use the Windows Subsystem for Linux (WSL) with Visual Studio Code (VS Code). We explore the installation process and the basics of using WSL. Additionally, we install and utilize the Visual Studio Code WSL extension. Finally, we demonstrate how to debug and run Python code in VS Code within our WSL environment.
Certification
Microsoft Certified: Azure Virtual Desktop Specialty - Certifications
Plan, deliver, manage, and monitor virtual desktop experiences and remote apps on Microsoft Azure for any device.
Documentation
Create and manage Fabric notebooks from VS Code for the Web - Microsoft Fabric
Learn about the VS Code extension for Synapse under the VS Code web experience, which supports a pro-developer authoring experience.
Explore lakehouses in Visual Studio Code - Microsoft Fabric
Use the VS Code extension for Synapse to explore your Fabric lakehouses, including tables and raw data.
Develop, execute, and debug notebook in VS Code - Microsoft Fabric
Learn about the VS Code extension for Synapse, which supports a pro-developer authoring experience, including running and debugging notebooks.