Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
When developing custom business logic, you can use public libraries from PyPI or incorporate your own private libraries for data processing or transformation. User data functions enable the addition of two types of libraries necessary for writing functions:
- Public libraries: Include any public library available on PyPI in the user data functions item.
- Private libraries: Upload your private libraries as a
.whl
package to the user data functions item.
Add a public library
Sign in to Microsoft Fabric .
Select the User data function item you're working on.
Select Library Management.
Note
fabric_user_data_functions
library is added and can't be removed. This is fabric functions library. You can update the version if there are future releases of this SDK.Select Add from PyPI to add new library. Provide the library name and select a version, for example
pandas
with version2.2.3
.Once a library is added to the User data functions item, it is in Saved state. The User data functions item needs to be published. All published libraries have Published state.
Select Add from PyPI to add more libraries to use with one or more functions in the user data function item.
Select Publish to update the changes made to the User data function. Now the function is ready to be tested.
Manage public libraries
- To update the version of an existing public library, navigate to your user data functions item and select Library management. Choose the required library, select the version drop-down, and update its version.
- To delete the library, select the trash option for each library appears when you hover over the corresponding row.
Publish the user data functions item whenever libraries are updated.
Add a private library
Private libraries refer to code built by you or your organization. User data functions allows you to upload a custom library file in .whl
format. Select the Upload button to add private libraries.
Limitations of private libraries
- The
.whl
file size must be less than 30MB. - The
.whl
file must be OS agnostic. If the file is specific to an operating system for examplenumpy-2.2.2-cp311-cp311-linux_armv6l.whl
, it will fail to upload.
Next steps
Learn how to reference these libraries in your function's code. You can also learn how to view your logs after running a Fabric Data Function.