Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.

Reply
HamidBee
Power Participant
Power Participant

Clarifying Data Transformation Process in Power BI When Using Python Script in 'Get Data'

Hi All, 

 

I have a specific query regarding the use of Python scripts for data import in Power BI. My process involves using the 'Get Data' feature in Power BI, where I choose Python as the data source. I provide the file path and execute some data transformation steps directly within the Python script at this stage, before the data is imported into Power BI.

 

My question is: Where exactly do these data transformations take place? Are they processed within the Power BI environment, or do they occur externally, in a manner similar to how query folding works with SQL data sources?.

 

To clarify further, I am not performing these transformations within the Power BI's Power Query using Python. Instead, these transformations are part of the Python script used in the initial data retrieval stage ('Get Data'). I'm trying to understand if Power BI simply imports the transformed data as-is, or if it plays any role in the transformation process, especially in terms of efficiency and performance.

 

Thanks in advance.

3 REPLIES 3
HamidBee
Power Participant
Power Participant

Hi @lbendlin. Thank you for your reply. Just to make sure I've understood correctly. Let's assume the Power BI report has not yet been published but is currently being built. I use Python to apply transformation steps when using the Get Data method. Are you saying this workload is done by the Python environment outside of Power BI?.

 

Which kind of leads me to my next question. If I import a file via Python, apply Power Query M transformations and then apply some more Python transformations in Power Query. Would this still mean all of the workload is pushed outside of Power BI to the python environment?.

Thanks in advance. 

 

Are you asking "will it fold?"  ?  I would doubt that but don't know for sure.  You can test it and seee for yourself.

lbendlin
Super User
Super User

Any Python or R script or visual mandates the use of a Personal Gateway.  That already tells you where the processing is happening - on your PC, or on the PC where the Personal Gateway app is running.

 

In my opinion this disqualifies the use of Python or R for any ETL work.  Doesn't seem to stop people from trying though, including attempts at data write back.  

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.