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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
h4tt3n
Resolver II
Resolver II

Getting Python data transformation scripts to work in PBI Service

I have a report that uses a Python script to transform timestamps from UTC to user / customer local time. The script runs in the Power Query environment and works perfectly in desktop, but I am having trouble understanding how to get it working in service.

 

I have read the following articles on how to use Python in PBI:
https://docs.microsoft.com/en-us/power-bi/connect-data/desktop-python-scripts
https://docs.microsoft.com/en-us/power-bi/connect-data/desktop-python-in-query-editor

https://docs.microsoft.com/en-us/power-bi/connect-data/refresh-scheduled-refresh

 

Questions:

 

  • What exactly is the purpose of the personal gateway. Why do I need it to run Python scripts?
  • Data is imported from an Azure db with SQL. Can I run the Python script from there?
  • Reports are running on a vm in Azure. Can I run the Python script on that machine?

 

Cheers, and have a nice day.

Mike

4 REPLIES 4
v-yingjl
Community Support
Community Support

Hi @h4tt3n ,

If you've fixed the issue on your own please kindly share your solution. If the above posts help, please kindly mark it as a solution to help others find it more quickly. Thanks!


Best Regards,
Yingjie Li

v-yingjl
Community Support
Community Support

Hi @h4tt3n ,

  1. Personal gateway is used to refresh your report in power bi service to ensure the data in the report is latest. Only running python scripts do not need gateway if you do not want to refresh report.
  2. & 3. As the document mentioned, you can select Run Python Script in power query editors to run python script whether the datasource comes for sql or azure.

 

Best Regards,
Yingjie Li

If this post helps then please consider Accept it as the solution to help the other members find it more quickly.

amitchandak
Super User
Super User

I am sorry, but this is not very helpful. As clearly stated above, I have already read the documentation, and my questions remain unanswered. Challenge is still unsolved.

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

Top Solution Authors