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
# Data science in Microsoft Fabric using Visual Studio Code
9
9
10
-
You can build and develop data science and data engineering solutions for [Microsoft Fabric](https://learn.microsoft.com/fabric/) within VS Code. [Microsoft Fabric](https://marketplace.visualstudio.com/items?itemName=fabric.vscode-fabric) extensions for VS Code provide an integrated development experience for working with Fabric artifacts, lakehouses, notebooks, and user data functions.
10
+
You can build and develop data science and data engineering solutions for [Microsoft Fabric](https://learn.microsoft.com/fabric/) within VS Code. [Microsoft Fabric](https://marketplace.visualstudio.com/items?itemName=fabric.vscode-fabric) extensions for VS Code provide an integrated development experience for working with Fabric artifacts, lakehouses, notebooks, and user data functions.
11
11
12
12
## What is Microsoft Fabric?
13
13
@@ -36,23 +36,26 @@ You can find and install the extensions from the [Visual Studio Marketplace](htt
36
36
|**Fabric Data Engineering**| Data engineers working with large-scale data & Spark | - Explore Lakehouses (tables, raw files)<br>- Develop/debug Spark notebooks<br>- Build/test Spark job definitions<br>- Sync notebooks between local VS Code & Fabric<br>- Preview schemas & sample data | You work with Spark, Lakehouses, or large-scale data pipelines and want to explore, develop, and debug locally. |[Develop Fabric notebooks in VS Code](https://learn.microsoft.com/fabric/data-engineering/setup-vs-code-extension)|
37
37
38
38
## Getting started
39
+
39
40
Once you have the extensions installed and signed in, you can start working with Fabric workspaces and items. In the Command Palette (`kb(workbench.action.showCommands)`), type **Fabric** to list the commands that are specific to Microsoft Fabric.
41
+
40
42

41
43
42
44
## Fabric Workspace and items explorer
43
45
44
46
The Fabric extensions provide a seamless way to work with both remote and local Fabric items.
45
-
- In the Fabric extension, the **Fabric Workspaces** section lists all items from your remote workspace, organized by type (Lakehouses, Notebooks, Pipelines, and more).
46
-
- In the Fabric extension, the **Local folder** section shows a Fabric item(s) folder opened in VS Code. It reflects the structure of your fabric item definition for each type that is opened in VS Code. This enables you to develop locally and publish your changes to current or new workspace.
47
+
48
+
* In the Fabric extension, the **Fabric Workspaces** section lists all items from your remote workspace, organized by type (Lakehouses, Notebooks, Pipelines, and more).
49
+
* In the Fabric extension, the **Local folder** section shows a Fabric item(s) folder opened in VS Code. It reflects the structure of your fabric item definition for each type that is opened in VS Code. This enables you to develop locally and publish your changes to current or new workspace.
47
50
48
51

49
52
50
53
## Use user data functions for data science
51
54
52
55
1. In the Command Palette (`kb(workbench.action.showCommands)`), type **Fabric: Create Item**.
53
-
2. Select your workspace and select **User data function**. Provide a name and select **Python** language.
54
-
3. You are notified to set up the Python virtual environment and continue to set this up locally.
55
-
4. Install the libraries using `pip install` or select the user data function item in the Fabric extension to add libraries. Update the `requirements.txt` file to specify the dependencies:
56
+
1. Select your workspace and select **User data function**. Provide a name and select **Python** language.
57
+
1. You are notified to set up the Python virtual environment and continue to set this up locally.
58
+
1. Install the libraries using `pip install` or select the user data function item in the Fabric extension to add libraries. Update the `requirements.txt` file to specify the dependencies:
56
59
57
60
```txt
58
61
fabric-user-data-functions ~= 1.0
@@ -63,108 +66,111 @@ The Fabric extensions provide a seamless way to work with both remote and local
63
66
joblib=1.2.0
64
67
```
65
68
66
-
4. Open `functions_app.py`. Here's an example of developing a User Data Function for data science using scikit-learn:
69
+
1. Open `functions_app.py`. Here's an example of developing a User Data Function for data science using scikit-learn:
67
70
68
-
```python
69
-
import datetime
70
-
import fabric.functions as fn
71
-
import logging
72
-
73
-
# Import additional libraries
74
-
import pandas as pd
75
-
from sklearn.ensemble import RandomForestClassifier
76
-
from sklearn.preprocessing import StandardScaler
77
-
from sklearn.model_selection import train_test_split
A Fabric notebook is an interactive workbook in Microsoft Fabric for writing and running code, visualizations, and markdown side-by-side. Notebooks support multiple languages (Python, Spark, SQL, Scala, and more) and are ideal for data exploration, transformation, and model development in Fabric working with your existing data in OneLake.
Refer to [Microsoft Fabric Notebooks](https://learn.microsoft.com/fabric/data-engineering/how-to-use-notebook) documentation to learn more.
200
206
201
207
## Git integration
208
+
202
209
Microsoft Fabric supports Git integration that enables version control and collaboration across data and analytics projects. You can connect a Fabric workspace to Git repositories, primarily Azure DevOps or GitHub, and only supported items are synced. This integration also supports CI/CD workflow to enable teams to manage releases efficiently and maintain high-quality analytics environments.
203
210
204
211

@@ -207,12 +214,11 @@ Microsoft Fabric supports Git integration that enables version control and colla
207
214
208
215
Now that you have Microsoft Fabric extensions set up in VS Code, explore these resources to deepen your knowledge:
209
216
210
-
### Learn more about Microsoft Fabric
211
217
*[Learn about Microsoft Fabric for Data Science](https://learn.microsoft.com/en-us/fabric/data-science/tutorial-data-science-introduction).
212
218
*[Set up your Fabric trial capacity](https://learn.microsoft.com/fabric/fundamentals/fabric-trial)
0 commit comments