Add ability to import normal python files / modules to notebooks
Please add the ability to import normal python files (called modules in python lingo) in a notebook. Like this:
import my_normal_python_file
my_normal_python_file.my_reusable_function()
This is normal python functionality but it's currently impossible when working with notebooks in fabric. Since we can only create notebooks and not normal python files, we have the option to use:
%run another_notebook
or
notebookutils.notebook.run("another_notebook")
Neither of these alternatives puts the functions inside "another_notebook" in a nice namespace like the regular python import statement does.
In databricks you can create regular python files and the import statement works as you expect. It would be nice to have the same functionality in fabric.
Please be aware of the distinction between packages and modules. There is already capability to install and import packages, but python packages are cumbersome to work with during heavy development. The import statement combined with regular python files (aka modules) is just right for a lot of use cases.
6 Comments
- SJCuthbertsonAdvocate ICrucially, for this to be useful, those normal python files HAVE to be part of the Fabric workspace git integration, just like notebooks are, and they HAVE to be supported by Fabric deployment pipelines.
- JohanRexRegular VisitorGood clarification. Just look at what databricks have done and implement the same. Plus deployment pipeline support of course.
- effdfdfdRegular VisitorThis is critical!
- skellNew MemberThis is indeed critical. Without this feature reusing code in Fabric is very cumbersome and crucially limited to PySpark notebooks which consume a lot of capacity! Most of us need to be able to develop using pure Python kernels and dont actually need spark!
- ex_kjetilhFrequent VisitorThis is critical!
- SimonHommelRegular VisitorCurrently we have to do bad workarounds for this. E.g. create a python file in a lakehouse and import it into the notebook from there. However, this is not git integrated and it is non-natural to develop code in a lakehouse. It would be great if we can create .py files in a workspace on the same level on which we can create notebooks. For me this is also a critical feature. Databricks has this for more than 2 years and in jupyterlab you can also work with ordinary text files.
Recent ideas
Power BI Admin & Governance Center – Centralized Activity and Usage Analytics
Subject: Feature Proposal: Advanced Power BI Admin & Governance Center – Centralized Activity, Access, Sharing, Licensing and Usage Analytics Dear Microsoft Power BI Team, I would like to propose a...Dr7awb3 hours agoNew MemberNew2Views0likes0CommentsFeature Proposal: Expandable/Collapsible Page Sections for Reports on Same Semantic Model
Subject: Feature Proposal: Expandable/Collapsible Page Sections for Reports Using the Same Semantic Model Dear Microsoft Power BI Team, I would like to propose an enhancement to the Power BI report...Dr7awb3 hours agoNew MemberNew3Views0likes0CommentsFeature Proposal: Fault-Tolerant Refresh, Schema Changes & Intelligent Retry
Subject: Feature Proposal: Fault-Tolerant Refresh, Schema Changes & Intelligent Retry Dear Microsoft Power BI Team, I would like to propose an enhancement to Power BI semantic model refresh behavio...Dr7awb3 hours agoNew MemberNew5Views0likes0CommentsFault-Tolerant Table-Level Refresh, Retry & Completeness Monitoring
Subject: Feature Proposal: Fault-Tolerant Table-Level Refresh, Retry & Completeness Monitoring Dear Microsoft Power BI Team, I would like to propose an enhancement to the Power BI semantic model re...Dr7awb3 hours agoNew MemberNew1View0likes0CommentsAllow Measures to Be Grouped/Categorized in Matrices and Tables
Introduce the ability to group and categorize measures directly within Matrix and Table visuals, allowing report developers to organize large sets of measures into logical sections or expandable cate...Dr7awb4 hours agoNew MemberNew3Views0likes0Comments