Variable Library Support in Notebook (Generally Available)
This release brings consistent, secure, and scalable configuration management directly into notebooks—streamlining environment-aware development and CI/CD workflows without hardcoding.
Why it Matters
As projects grow, managing environment-specific settings can become complex. With Variable Library support in notebooks, you can:
- Centralize configuration management for notebooks without hardcoding values.
- Enable dynamic parameterization for Spark settings, lakehouse bindings, and compute configurations.
- Simplify CI/CD pipelines by using variables across environments and stages.
Key Highlights
- NotebookUtils Integration – Access variables programmatically in your notebook code using the NotebookUtils Variable library utilities APIs, run the notebookutils.variableLibrary.help() to get more detailed usage.
- Service Principal (SPN) support – SPN authentication is now available for Variable Library, enabling secure, automated processes in enterprise CI/CD pipelines and notebook activity pipelines.
- Use %%configure to dynamically assign runtime settings – Combine Variable Library with %%configure to bind environment-specific runtime settings in the notebook, such as the default lakehouse, without manual edits.
The following is an example of how to use Variable Library in notebook.


Resources
- NotebookUtils (former MSSparkUtils) for Fabric – Microsoft Fabric | Microsoft Learn
- Use %%configure dynamically customize your notebook session with Variable library: Develop, execute, and manage notebooks – Microsoft Fabric | Microsoft Learn
- Spark Development best practice – How to replace parameters in notebook CI/CD flow: Development and Monitoring – Microsoft Fabric | Microsoft Learn