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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors
Top Kudoed Authors