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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
Pawel_1990
Regular Visitor

Snowflake data source - Python Pandas - Working Desktop / Not working on Workspace

Hello,

We wanted to start using Python libraries in some of our dashboards. As proof of concept, I had to test if Pandas library is working. 

Test #1 - Excell as source file
I used Excel as source, added some simple step at Power Query using Pandas. Everything worked on Desktop and workspace. 

Test #2 - Table from Snowflake as source
Connected via connector to Snowflake, picked one table as Import and as previously did some simple changes using Pandas Library. There are also other tables in direct query mode used at this file.
It worked on desktop. But when published to Workspace errors showed up:

Pawel_1990_0-1743496340216.png

Pawel_1990_1-1743496390742.png

 

Not sure what should be changed or set up differently. Was reading many guides, but was not able to solve it. I know it's not Pandas / Python version issue, because excel version is working. 
Thank you in advance for help. 


1 ACCEPTED SOLUTION

Hi @Pawel_1990 ,

Thank you for reaching out to the Microsoft Community Forum.

 


Some of the issues listed below:

 

1. Verify Python Installation: Ensure that Python is installed on your machine and that the path to the Python executable  is correctly set in the environment variables.

 

https://learn.microsoft.com/en-us/power-bi/connect-data/service-python-packages-support

 

2. Python scripts only work with personal gateways. Please refer the below thread

 

https://community.fabric.microsoft.com/t5/Service/Python-script-as-a-data-source-in-Power-BI-Service...

 

https://community.fabric.microsoft.com/t5/Service/PowerBI-Service-with-Python-as-Data-source/m-p/899...

 

3. Additionally, as  @Akash_Varuna  suggested try running the Python transformations outside Power BI. 

 

If my response has resolved your query, please mark it as the Accepted Solution to assist others. Additionally, a 'Kudos' would be appreciated if you found my response helpful.

 

Thank you

 

View solution in original post

8 REPLIES 8
Pawel_1990
Regular Visitor

@Akash_Varuna , @v-priyankata 
Thank you both for help. Had some successes, will try to summarize:
1. Switched all tables in Power Bi desktop to import from direct query.
2. Configured Personal Gateway
3. Uploaded file - it works at Power Bi Workspace
4. Scheduled refresh cannot be set - issue with Python Creditentials. Tried every possible combination and it fails.

Are you able to advice what can be the issue there? Had to cover company important info 🙂 

Pawel_1990_0-1743595755206.png

 

Hi @Pawel_1990 ,

Thank you for reaching out to the Microsoft Community Forum.

 


Some of the issues listed below:

 

1. Verify Python Installation: Ensure that Python is installed on your machine and that the path to the Python executable  is correctly set in the environment variables.

 

https://learn.microsoft.com/en-us/power-bi/connect-data/service-python-packages-support

 

2. Python scripts only work with personal gateways. Please refer the below thread

 

https://community.fabric.microsoft.com/t5/Service/Python-script-as-a-data-source-in-Power-BI-Service...

 

https://community.fabric.microsoft.com/t5/Service/PowerBI-Service-with-Python-as-Data-source/m-p/899...

 

3. Additionally, as  @Akash_Varuna  suggested try running the Python transformations outside Power BI. 

 

If my response has resolved your query, please mark it as the Accepted Solution to assist others. Additionally, a 'Kudos' would be appreciated if you found my response helpful.

 

Thank you

 

Hi @Pawel_1990 ,

If you find this post helpful, please mark it as an "Accept as Solution" and consider giving a KUDOS. Feel free to reach out if you need further assistance.
Thanks and Regards

Hi @Pawel_1990 ,

If you find this post helpful, please mark it as an "Accept as Solution" and consider giving a KUDOS. Feel free to reach out if you need further assistance.
Thanks and Regards

Hi @Pawel_1990 ,

If you find this post helpful, please mark it as an "Accept as Solution" and consider giving a KUDOS. Feel free to reach out if you need further assistance.
Thanks and Regards

Hi @Pawel_1990 Personal Gateway doesn’t support Python scripts, try running the Python transformations outside Power BI . You can also use an Enterprise Gateway instead which may solve the case

v-priyankata
Community Support
Community Support

Hi @Pawel_1990 ,

 

Thank you for reaching out to the Microsoft Community Forum.

 

Some of the issues listed below:

 

Python Environment on Power BI Service : Ensure that the Python environment on the Power BI Service has the same libraries installed. Unfortunately, you can't directly install packages in Power BI Service, but you can test with a minimal script to isolate the issue. And use a Python script in Power BI Desktop to check for errors before publishing.

 

Data Source Credentials & Permissions (Snowflake connection issues are common when moving from Desktop to Service due to credential handling):
Go to Power BI Service > Dataset Settings > Data source credentials and verify that the credentials are configured correctly. Check if the Snowflake credentials are supported in the Service (especially if using a custom connector).

 

DirectQuery vs Import Mode Conflict: You mentioned using DirectQuery for other tables and Import for the Snowflake table. Mixing these modes can cause issues, especially when applying transformations with Python. Try converting the other tables to Import mode to see if that resolves the issue. Alternatively, test with all tables in DirectQuery mode to check for conflicts.

 

Power BI Service Limitation : The Service has some limitations with Python scripts. No support for interactive visualizations within Python scripts. Certain operations (especially heavy computations) might not run due to resource constraints. Optimize your Pandas code for performance. Test with simpler data to narrow down the problem.

 

 

If my response has resolved your query, please mark it as the Accepted Solution to assist others. Additionally, a 'Kudos' would be appreciated if you found my response helpful.

 

Thank you

Akash_Varuna
Community Champion
Community Champion

Hi @Pawel_1990 As you said the excel is working fine it is likely because of the connection to Snowflake it actually requires Gateway ..... some of the likely issues are listed please check these and see if it solves your issue

  1. Gateway Requirement – Power BI Service needs an on-premises data gateway for Snowflake. Ensure it's installed and configured.

  2. Authentication Issues – Check Dataset Settings → Data source credentials and confirm your Snowflake login is correctly set.

  3. DirectQuery and Python Conflict – If some tables use DirectQuery, Python transformations may fail. Try switching all Snowflake tables to Import mode and republish.

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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