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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
numersoz
Helper III
Helper III

Using Power BI Desktop on Cloud with Python Support to Get Data

Hi,

I've just learned that it is possible to use a Python script to get data in Power Query. I will use Python to get data from an API. I know I can do this with Power Query too, but there are too many parameters involved and I feel more confident using Python, as with M code it will be too complicated for me.  .

I need the dashboard that I created using Python to get the data on the cloud.  On-Premises Data Gateway lets you use your Power BI Desktop file which has Pyhton script in it so that it can be published online. But my laptop isn't going to be on 24/7. What would be the ideal environment to have this Power BI Desktop file run on?

Should I get an Azure virtual machine? I really don't want to get a virtual machine and pay for it just for this purpose. Is there a better way to do this?

3 REPLIES 3
Kave
Regular Visitor

Hi,
It's my problem as well. And as I understood, we have to use a Gateway to run a Python script through the Power BI cloud (we are waiting for such an ability on the next versions of PBI).
Now, I am working on setting a connection between the PBI cloud, Python, and data Gateway.
Not easy and straightforward, but I try my best. And I let you know about this case later.

v-juanli-msft
Community Support
Community Support

Hi @numersoz 

If your data source is online, you don't need a gateway to refresh data automatically.

Using the data source with power bi desktop, after publishing to service, go to Setting->dataset->select this dataset->schedule refresh->edit credentials.

 

Best Regards
Maggie

 

Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

@v-juanli-msft Hi Maggie,

Yes, the data is online, but I am planning to use Python to get this data. If I upload the Power BI, will it still be able to run the Python script to get the data? When you use to get data from Python, you have to specify your Python interpreter. How would I do this online?

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.